|
PocketMine-MP 5.36.1 git-eaa7c4834c8fe2f379d24e7f0ee6cc63cfb18ccc
|
Inheritance diagram for pocketmine\block\utils\Container:
Collaboration diagram for pocketmine\block\utils\Container:Public Member Functions | |
| canOpenWith (string $key) | |
| getInventory () | |
| isOpeningObstructed () | |
| openToUnchecked (Player $player) | |
Blocks which have an associated inventory of contents Default implementation provided by {
Definition at line 32 of file Container.php.
| pocketmine\block\utils\Container::canOpenWith | ( | string | $key | ) |
Returns whether an item with the given key as its custom name can be used to access the container's contents.
| pocketmine\block\utils\Container::getInventory | ( | ) |
Returns the inventory of this container. Note: This may return NULL if the container's tile was missing or incorrect. This is rare, but may occur as a result of plugins incorrectly creating blocks, or legacy world data.
Implemented in pocketmine\block\Chest.
|
inherited |
Returns whether the block's ability to open the menu is currently obstructed (e.g. by nearby blocks).
Implemented in pocketmine\block\Chest, pocketmine\block\EnderChest, and pocketmine\block\ShulkerBox.
|
inherited |
Opens the menu to the player. Note: No preconditions are checked. Do not check for obstruction or locks here.
Returns true if successful, false otherwise (e.g. event cancelled, container missing)