PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
|
Public Member Functions | |
__construct (protected Player $player, protected BlockTransaction $transaction, protected Block $blockAgainst, protected Item $item) | |
call () | |
getBlockAgainst () | |
getEventName () | |
getItem () | |
getPlayer () | |
getTransaction () | |
isCancelled () | |
Static Public Member Functions | |
static | hasHandlers () |
Protected Attributes | |
string | $eventName = null |
Called when a player initiates a block placement action. More than one block may be changed by a single placement action, for example when placing a door.
Definition at line 38 of file BlockPlaceEvent.php.
pocketmine\event\block\BlockPlaceEvent::__construct | ( | protected Player | $player, |
protected BlockTransaction | $transaction, | ||
protected Block | $blockAgainst, | ||
protected Item | $item ) |
Definition at line 41 of file BlockPlaceEvent.php.
|
inherited |
pocketmine\event\block\BlockPlaceEvent::getBlockAgainst | ( | ) |
Definition at line 78 of file BlockPlaceEvent.php.
pocketmine\event\block\BlockPlaceEvent::getItem | ( | ) |
Gets the item in hand
Definition at line 63 of file BlockPlaceEvent.php.
pocketmine\event\block\BlockPlaceEvent::getPlayer | ( | ) |
Returns the player who is placing the block.
Definition at line 56 of file BlockPlaceEvent.php.
pocketmine\event\block\BlockPlaceEvent::getTransaction | ( | ) |
Returns a BlockTransaction object containing all the block positions that will be changed by this event, and the states they will be changed to.
This will usually contain only one block, but may contain more if the block being placed is a multi-block structure such as a door or bed.
Definition at line 74 of file BlockPlaceEvent.php.
|
staticinherited |
|
inherited |
Returns whether this instance of the event is currently cancelled.
If it is cancelled, only downstream handlers that declare @handleCancelled
will be called with this event.
|
protectedinherited |