Skip to content

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 after it has grown.

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

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

endstone::BlockGrowEvent::ENDSTONE_EVENT (
    BlockGrowEvent
) 

function getNewState

Gets the state of the block after it has grown.

inline BlockState & endstone::BlockGrowEvent::getNewState () const

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