Class endstone::BlockExplodeEvent¶
ClassList > endstone > BlockExplodeEvent
Called when a block explodes (e.g. bed in the Nether, respawn anchor in the Overworld). 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¶
| 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 () override 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) override 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¶
| Type | Name |
|---|---|
| virtual void | cancel () = 0 |
| virtual bool | isCancelled () const = 0 |
| virtual void | setCancelled (bool cancel) = 0 |
| virtual | ~ICancellable () = default |
Detailed Description¶
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¶
function getBlockList [½]¶
Returns the list of blocks that would have been removed or were removed from the explosion event.
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.
Returns:
All blown-up blocks
function ~BlockExplodeEvent¶
The documentation for this class was generated from the following file include/endstone/event/block/block_explode_event.h