getHolder() public method

public getHolder ( ) : pocketmine\inventory\InventoryHolder
return pocketmine\inventory\InventoryHolder
Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 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');
 }