Skip to content

Class endstone::ActorExplodeEvent

ClassList > endstone > ActorExplodeEvent

Called when an actor explodes.

  • #include <endstone/event/actor/actor_explode_event.h>

Inherits the following classes: endstone::Cancellable

Public Functions

Type Name
ActorExplodeEvent (Actor & actor, Location location, BlockList blocks)
ENDSTONE_EVENT (ActorExplodeEvent)
const BlockList & getBlockList () const
Returns the list of blocks that would have been removed or were removed from the explosion event.
BlockList & getBlockList ()
Returns the list of blocks that would have been removed or were removed from the explosion event.
const Location & getLocation () const
Returns the location where the explosion happened.
~ActorExplodeEvent () override

Public Functions inherited from endstone::Cancellable

See endstone::Cancellable

Type Name
virtual void cancel ()
Cancel this event.
virtual bool isCancelled () override const
Gets the cancellation state of this event.
virtual void setCancelled (bool cancel) override
Sets the cancellation state of this event.

Public Functions inherited from endstone::ICancellable

See endstone::ICancellable

Type Name
virtual void cancel () = 0
Cancels this event.
virtual bool isCancelled () const = 0
Gets the cancellation state of this event.
virtual void setCancelled (bool cancel) = 0
Sets the cancellation state of this event.
virtual ~ICancellable () = default

Public Functions Documentation

function ActorExplodeEvent

inline explicit endstone::ActorExplodeEvent::ActorExplodeEvent (
    Actor & actor,
    Location location,
    BlockList blocks
) 

function ENDSTONE_EVENT

endstone::ActorExplodeEvent::ENDSTONE_EVENT (
    ActorExplodeEvent
) 

function getBlockList [½]

Returns the list of blocks that would have been removed or were removed from the explosion event.

inline const BlockList & endstone::ActorExplodeEvent::getBlockList () const

Returns:

All blown-up blocks


function getBlockList [2/2]

Returns the list of blocks that would have been removed or were removed from the explosion event.

inline BlockList & endstone::ActorExplodeEvent::getBlockList () 

Returns:

All blown-up blocks


function getLocation

Returns the location where the explosion happened.

inline const  Location & endstone::ActorExplodeEvent::getLocation () const

It is not possible to get this value from the Entity as the Entity no longer exists in the world.

Returns:

The location of the explosion


function ~ActorExplodeEvent

endstone::ActorExplodeEvent::~ActorExplodeEvent () override


The documentation for this class was generated from the following file include/endstone/event/actor/actor_explode_event.h