PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\event\entity\EntityPreExplodeEvent Class Reference
+ Inheritance diagram for pocketmine\event\entity\EntityPreExplodeEvent:
+ Collaboration diagram for pocketmine\event\entity\EntityPreExplodeEvent:

Public Member Functions

 __construct (Entity $entity, protected float $radius)
 
 call ()
 
 getEntity ()
 
 getEventName ()
 
 getRadius ()
 
 isBlockBreaking ()
 
 isCancelled ()
 
 setBlockBreaking (bool $affectsBlocks)
 
 setRadius (float $radius)
 

Static Public Member Functions

static hasHandlers ()
 

Protected Attributes

Entity $entity
 
string $eventName = null
 

Detailed Description

Called when an entity decides to explode, before the explosion's impact is calculated. This allows changing the force of the explosion and whether it will destroy blocks.

See also
EntityExplodeEvent

@phpstan-extends EntityEvent<Entity>

Definition at line 38 of file EntityPreExplodeEvent.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\event\entity\EntityPreExplodeEvent::__construct ( Entity $entity,
protected float $radius )

Definition at line 43 of file EntityPreExplodeEvent.php.

Member Function Documentation

◆ 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.

◆ getEntity()

◆ getEventName()

pocketmine\event\Event::getEventName ( )
finalinherited

Definition at line 40 of file Event.php.

◆ getRadius()

pocketmine\event\entity\EntityPreExplodeEvent::getRadius ( )

Definition at line 53 of file EntityPreExplodeEvent.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.

◆ isBlockBreaking()

pocketmine\event\entity\EntityPreExplodeEvent::isBlockBreaking ( )

Definition at line 64 of file EntityPreExplodeEvent.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.

◆ setBlockBreaking()

pocketmine\event\entity\EntityPreExplodeEvent::setBlockBreaking ( bool $affectsBlocks)

Definition at line 68 of file EntityPreExplodeEvent.php.

◆ setRadius()

pocketmine\event\entity\EntityPreExplodeEvent::setRadius ( float $radius)

Definition at line 57 of file EntityPreExplodeEvent.php.

Member Data Documentation

◆ $entity

◆ $eventName

string pocketmine\event\Event::$eventName = null
protectedinherited

Definition at line 38 of file Event.php.


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