getHolder() 공개 메소드

public getHolder ( ) : pocketmine\inventory\InventoryHolder
리턴 pocketmine\inventory\InventoryHolder
예제 #1
0
 public function isNeChest(Inventory $inv)
 {
     if ($inv instanceof DoubleChestInventory) {
         return false;
     }
     if (!$inv instanceof ChestInventory) {
         return false;
     }
     $tile = $inv->getHolder();
     if (!$tile instanceof Chest) {
         return false;
     }
     $bl = $tile->getBlock();
     if ($bl->getId() != Block::CHEST) {
         return false;
     }
     if ($bl->getSide(Vector3::SIDE_DOWN)->getId() != $this->base_block) {
         return false;
     }
     return true;
 }
예제 #2
0
파일: Main.php 프로젝트: xHFx/TreasureHunt-
 public function deleteChest(Inventory $inv)
 {
     $bl = $inv->getHolder()->getBlock();
     $x = $bl->getFloorX();
     $y = $bl->getFloorY();
     $z = $bl->getFloorZ();
     unset($this->chests[$x . ":" . $y . ":" . $z]);
     //	$this->getLogger()->info('Chest deleted');
 }