Class endstone::BlockGrowEvent¶
ClassList > endstone > BlockGrowEvent
Called when a block grows naturally in the world. More...
#include <endstone/event/block/block_grow_event.h>
Inherits the following classes: endstone::Cancellable
Inherited by the following classes: endstone::BlockFormEvent
Public Functions¶
| Type | Name |
|---|---|
| BlockGrowEvent (const NotNull< Block > & block, const NotNull< BlockState > & new_state) |
|
| ENDSTONE_EVENT (BlockGrowEvent) |
|
| const NotNull< BlockState > & | getNewState () const Gets the state of the block after it has grown. |
Public Functions inherited from 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¶
| 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¶
If a Block Grow event is cancelled, the block will not grow.
Public Functions Documentation¶
function BlockGrowEvent¶
inline explicit endstone::BlockGrowEvent::BlockGrowEvent (
const NotNull < Block > & block,
const NotNull < BlockState > & new_state
)
function ENDSTONE_EVENT¶
function getNewState¶
Gets the state of the block after it has grown.
Returns:
The new state of the block.
The documentation for this class was generated from the following file include/endstone/event/block/block_grow_event.h