Skip to content

Class endstone::BlockFromToEvent

ClassList > endstone > BlockFromToEvent

Represents events with a source block and a destination block, currently only applies to liquid (lava and water) and teleporting dragon eggs. More...

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

Inherits the following classes: endstone::Cancellable

Public Functions

Type Name
BlockFromToEvent (std::unique_ptr< Block > block, std::unique_ptr< Block > to_block)
ENDSTONE_EVENT (BlockFromToEvent)
Block & getToBlock () const
Convenience method for getting the faced Block .

Public Functions inherited from endstone::Cancellable

See 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

See endstone::ICancellable

Type Name
virtual void cancel () = 0
virtual bool isCancelled () const = 0
virtual void setCancelled (bool cancel) = 0
virtual ~ICancellable () = default

Protected Attributes

Type Name
std::unique_ptr< Block > to_

Detailed Description

If a Block From To event is cancelled, the block will not move (the liquid will not flow).

Public Functions Documentation

function BlockFromToEvent

inline explicit endstone::BlockFromToEvent::BlockFromToEvent (
    std::unique_ptr< Block > block,
    std::unique_ptr< Block > to_block
) 

function ENDSTONE_EVENT

endstone::BlockFromToEvent::ENDSTONE_EVENT (
    BlockFromToEvent
) 

function getToBlock

Convenience method for getting the faced Block .

inline Block & endstone::BlockFromToEvent::getToBlock () const

Returns:

The faced Block


Protected Attributes Documentation

variable to_

std::unique_ptr<Block> endstone::BlockFromToEvent::to_;


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