PocketMine-MP 5.33.2 git-1133d49c924b4358c79d44eeb97dcbf56cb4d1eb
Loading...
Searching...
No Matches
pocketmine\block\utils\AnimatedContainerLike Interface Reference
+ Inheritance diagram for pocketmine\block\utils\AnimatedContainerLike:
+ Collaboration diagram for pocketmine\block\utils\AnimatedContainerLike:

Public Member Functions

 isOpeningObstructed ()
 
 onViewerAdded ()
 
 onViewerRemoved ()
 
 openToUnchecked (Player $player)
 

Detailed Description

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.

Member Function Documentation

◆ isOpeningObstructed()

pocketmine\block\utils\MenuAccessor::isOpeningObstructed ( )
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.

◆ onViewerAdded()

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.

◆ onViewerRemoved()

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.

◆ openToUnchecked()

pocketmine\block\utils\MenuAccessor::openToUnchecked ( Player $player)
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)


The documentation for this interface was generated from the following file: