pocketmine\tile\Chest::close PHP Method

close() public method

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

Usage Example

コード例 #1
0
ファイル: TrappedChest.php プロジェクト: ecoron/MinionsLandPE
 public function close()
 {
     if ($this->closed === false) {
         foreach ($this->getInventory()->getViewers() as $player) {
             $player->removeWindow($this->getInventory());
         }
         foreach ($this->getInventory()->getViewers() as $player) {
             $player->removeWindow($this->getRealInventory());
         }
         parent::close();
     }
 }