コード例 #1
0
ファイル: Human.php プロジェクト: ajreimine/PocketMine-0.13.x
 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();
     }
 }
コード例 #2
0
ファイル: Human.php プロジェクト: robske110/ClearSky
 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();
     }
 }
コード例 #3
0
 public function close()
 {
     $this->created = false;
     parent::close();
 }