public function close() { if ($this->closed === false) { foreach ($this->getInventory()->getViewers() as $player) { $player->removeWindow($this->getInventory()); } parent::close(); } }
public function close() { if ($this->closed === false) { foreach ($this->getInventory()->getViewers() as $player) { $this->getInventory()->close($player); } foreach ($this->getRealInventory()->getViewers() as $player) { $this->getRealInventory()->close($player); } parent::close(); } }
public function close() { if ($this->closed === false) { foreach ($this->getInventory()->getViewers() as $player) { $player->removeWindow($this->getInventory()); } foreach ($this->getTile()->getInventory() as $chest) { $chest->removeWindow($this->getRealInventory()); //Testing } parent::close(); } }