Skip to content

Class endstone::BlockExplodeEvent

ClassList > endstone > BlockExplodeEvent

Called when a block explodes (e.g. More...

  • #include <endstone/event/block/block_explode_event.h>

Inherits the following classes: endstone::Cancellable

Public Functions

Type Name
BlockExplodeEvent (std::unique_ptr< Block > block, BlockList blocks)
ENDSTONE_EVENT (BlockExplodeEvent)
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.
~BlockExplodeEvent () 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

Detailed Description

bed in the Nether, respawn anchor in the Overworld).

If a BlockExplodeEvent is cancelled, the explosion will not occur.

Public Functions Documentation

function BlockExplodeEvent

inline explicit endstone::BlockExplodeEvent::BlockExplodeEvent (
    std::unique_ptr< Block > block,
    BlockList blocks
) 

function ENDSTONE_EVENT

endstone::BlockExplodeEvent::ENDSTONE_EVENT (
    BlockExplodeEvent
) 

function getBlockList [½]

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

inline const BlockList & endstone::BlockExplodeEvent::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::BlockExplodeEvent::getBlockList () 

Returns:

All blown-up blocks


function ~BlockExplodeEvent

endstone::BlockExplodeEvent::~BlockExplodeEvent () override


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