PocketMine-MP 5.33.2 git-1133d49c924b4358c79d44eeb97dcbf56cb4d1eb
|
Public Member Functions | |
isOpeningObstructed () | |
onViewerAdded () | |
onViewerRemoved () | |
openToUnchecked (Player $player) | |
Blocks which have audiovisual behaviour (like chests) and remain in their "open" state for as long as at least 1 viewer is viewing the menu they provide access to
Definition at line 30 of file AnimatedContainerLike.php.
|
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.
pocketmine\block\utils\AnimatedContainerLike::onViewerAdded | ( | ) |
Do actions when the container block is opened by a player. If you have a custom viewer counter (like ender chests), you should increment it here.
Implemented in pocketmine\block\EnderChest.
pocketmine\block\utils\AnimatedContainerLike::onViewerRemoved | ( | ) |
Do actions when the container block is closed by a player. As above, you should decrement your custom viewer counter here, if you have one.
Implemented in pocketmine\block\EnderChest.
|
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)