Skip to content

Class endstone::EventHandler

ClassList > endstone > EventHandler

Represents a registered EventHandler which associates with aPlugin .

  • #include <endstone/event/event_handler.h>

Public Functions

Type Name
EventHandler (std::string event, std::function< void(Event &)> executor, EventPriority priority, Plugin & plugin, bool ignore_cancelled)
void callEvent (Event & event) const
Calls the event executor.
std::string getEventType () const
Gets the event type for this registration.
Plugin & getPlugin () const
Gets the plugin for this registration.
EventPriority getPriority () const
Gets the priority for this registration.
bool isIgnoreCancelled () const
Whether this listener accepts cancelled events.

Public Functions Documentation

function EventHandler

inline endstone::EventHandler::EventHandler (
    std::string event,
    std::function< void ( Event &)> executor,
    EventPriority priority,
    Plugin & plugin,
    bool ignore_cancelled
) 

function callEvent

Calls the event executor.

inline void endstone::EventHandler::callEvent (
    Event & event
) const

Parameters:

  • event The event

function getEventType

Gets the event type for this registration.

inline std::string endstone::EventHandler::getEventType () const

Returns:

Registered event type


function getPlugin

Gets the plugin for this registration.

inline Plugin & endstone::EventHandler::getPlugin () const

Returns:

Registered Plugin


function getPriority

Gets the priority for this registration.

inline EventPriority endstone::EventHandler::getPriority () const

Returns:

Registered Priority


function isIgnoreCancelled

Whether this listener accepts cancelled events.

inline bool endstone::EventHandler::isIgnoreCancelled () const

Returns:

True when ignoring cancelled events



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