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)
std::string getEventType () const
Plugin & getPlugin () const
EventPriority getPriority () const
bool isIgnoreCancelled () const

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

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

Calls the event executor

Parameters:

  • event The event

function getEventType

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

Gets the event type for this registration

Returns:

Registered event type


function getPlugin

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

Gets the plugin for this registration

Returns:

Registered Plugin


function getPriority

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

Gets the priority for this registration

Returns:

Registered Priority


function isIgnoreCancelled

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

Whether this listener accepts cancelled events

Returns:

True when ignoring cancelled events



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