Esempio n. 1
0
 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();
     }
 }
Esempio n. 2
0
 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();
     }
 }
Esempio n. 3
0
 public function close()
 {
     $this->created = false;
     parent::close();
 }