public function close() { if (!$this->closed) { if (!$this instanceof Player or $this->loggedIn) { foreach ($this->inventory->getViewers() as $viewer) { $viewer->removeWindow($this->inventory); } } parent::close(); } }
public function close() { if (!$this->closed) { if ($this->getFloatingInventory() instanceof FloatingInventory) { foreach ($this->getFloatingInventory()->getContents() as $craftingItem) { $this->level->dropItem($this, $craftingItem); } } else { $this->server->getLogger()->debug("Attempted to drop a null crafting inventory"); } if (!$this instanceof Player or $this->loggedIn) { foreach ($this->inventory->getViewers() as $viewer) { $viewer->removeWindow($this->inventory); } } parent::close(); } }
public function close() { $this->created = false; parent::close(); }