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 (std::unique_ptr< Block > block, std::unique_ptr< BlockState > new_state) |
|
| ENDSTONE_EVENT (BlockGrowEvent) |
|
| BlockState & | getNewState () const Gets the state of the block where it will form or spread to. |
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 Block Grow event is cancelled, the block will not grow.
Public Functions Documentation¶
function BlockGrowEvent¶
inline explicit endstone::BlockGrowEvent::BlockGrowEvent (
std::unique_ptr< Block > block,
std::unique_ptr< BlockState > new_state
)
function ENDSTONE_EVENT¶
function getNewState¶
Gets the state of the block where it will form or spread to.
Returns:
The block state for this events block
The documentation for this class was generated from the following file include/endstone/event/block/block_grow_event.h