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 Static Attributes

Type Name
const std::string NAME = "ActorExplodeEvent"

Public Functions

Type Name
ActorExplodeEvent (Actor & actor, Location location, BlockList blocks)
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.
virtual std::string getEventName () override const
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. A cancelled event will not be executed in the server, but will still pass to other plugins.
virtual bool isCancelled () const
Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
virtual void setCancelled (bool cancel)
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Public Functions inherited from endstone::ICancellable

See endstone::ICancellable

Type Name
virtual void cancel () = 0
virtual bool isCancelled () const = 0
virtual void setCancelled (bool cancel) = 0
virtual ~ICancellable () = default

Public Static Attributes Documentation

variable NAME

const std::string endstone::ActorExplodeEvent::NAME;

Public Functions Documentation

function ActorExplodeEvent

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

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 getEventName

inline virtual std::string endstone::ActorExplodeEvent::getEventName () override const

Gets a user-friendly identifier for this event.

Returns:

name of this event

Implements endstone::Event::getEventName


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