Called when a player destroys a block somewhere in the world.
Definition at line 35 of file BlockBreakEvent.php.
◆ __construct()
pocketmine\event\block\BlockBreakEvent::__construct |
( |
protected Player | $player, |
|
|
Block | $block, |
|
|
protected Item | $item, |
|
|
protected bool | $instaBreak = false, |
|
|
array | $drops = [], |
|
|
protected int | $xpDrops = 0 ) |
◆ call()
pocketmine\event\Event::call |
( |
| ) |
|
|
inherited |
Calls event handlers registered for this event.
- Exceptions
-
RuntimeException if event call recursion reaches the max depth limit
Definition at line 49 of file Event.php.
◆ getBlock()
pocketmine\event\block\BlockEvent::getBlock |
( |
| ) |
|
|
inherited |
◆ getDrops()
pocketmine\event\block\BlockBreakEvent::getDrops |
( |
| ) |
|
◆ getEventName()
pocketmine\event\Event::getEventName |
( |
| ) |
|
|
finalinherited |
◆ getInstaBreak()
pocketmine\event\block\BlockBreakEvent::getInstaBreak |
( |
| ) |
|
Returns whether the block may be broken in less than the amount of time calculated. This is usually true for creative players.
Definition at line 74 of file BlockBreakEvent.php.
◆ getItem()
pocketmine\event\block\BlockBreakEvent::getItem |
( |
| ) |
|
◆ getPlayer()
pocketmine\event\block\BlockBreakEvent::getPlayer |
( |
| ) |
|
◆ getXpDropAmount()
pocketmine\event\block\BlockBreakEvent::getXpDropAmount |
( |
| ) |
|
Returns how much XP will be dropped by breaking this block.
Definition at line 106 of file BlockBreakEvent.php.
◆ hasHandlers()
static pocketmine\event\Event::hasHandlers |
( |
| ) |
|
|
staticinherited |
Returns whether the current class context has any registered global handlers. This can be used in hot code paths to avoid unnecessary event object creation.
Usage: SomeEventClass::hasHandlers()
Definition at line 77 of file Event.php.
◆ isCancelled()
pocketmine\event\Cancellable::isCancelled |
( |
| ) |
|
|
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.
◆ setDrops()
pocketmine\event\block\BlockBreakEvent::setDrops |
( |
array | $drops | ) |
|
◆ setDropsVariadic()
pocketmine\event\block\BlockBreakEvent::setDropsVariadic |
( |
Item ... | $drops | ) |
|
◆ setInstaBreak()
pocketmine\event\block\BlockBreakEvent::setInstaBreak |
( |
bool | $instaBreak | ) |
|
◆ setXpDropAmount()
pocketmine\event\block\BlockBreakEvent::setXpDropAmount |
( |
int | $amount | ) |
|
◆ $blockDrops
array pocketmine\event\block\BlockBreakEvent::$blockDrops = [] |
|
protected |
◆ $eventName
string pocketmine\event\Event::$eventName = null |
|
protectedinherited |
The documentation for this class was generated from the following file: