Skip to content

Class endstone::BlockPistonEvent

ClassList > endstone > BlockPistonEvent

Called when a piston block is triggered.

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

Inherits the following classes: endstone::BlockEvent

Public Static Attributes

Type Name
const std::string NAME = "BlockPistonEvent"

Public Functions

Type Name
BlockPistonEvent (std::shared_ptr< Block > block, Player & player)
virtual std::string getEventName () override const
~BlockPistonEvent () override

Public Functions inherited from endstone::BlockEvent

See endstone::BlockEvent

Type Name
BlockEvent (std::shared_ptr< Block > block)
Block & getBlock () const
Gets the block involved in this event.
~BlockEvent () override

Public Functions inherited from endstone::Event

See endstone::Event

Type Name
Event (bool async=false)
Event (const Event &) = delete
virtual std::string getEventName () const = 0
bool isAsynchronous () const
Event & operator= (const Event &) = delete
virtual ~Event () = default

Public Static Attributes Documentation

variable NAME

const std::string endstone::BlockPistonEvent::NAME;

Public Functions Documentation

function BlockPistonEvent

inline explicit endstone::BlockPistonEvent::BlockPistonEvent (
    std::shared_ptr< Block > block,
    Player & player
) 

function getEventName

inline virtual std::string endstone::BlockPistonEvent::getEventName () override const

Gets a user-friendly identifier for this event.

Returns:

name of this event

Implements endstone::Event::getEventName


function ~BlockPistonEvent

endstone::BlockPistonEvent::~BlockPistonEvent () override


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