Skip to content

Class endstone::HandlerList

ClassList > endstone > HandlerList

A list of event handlers. Should be instantiated on a per-event basis.

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

Public Functions

Type Name
HandlerList (std::string event)
std::vector< EventHandler * > getHandlers () const
EventHandler * registerHandler (std::unique_ptr< EventHandler > handler)
void unregister (const EventHandler & handler)
void unregister (const Plugin & plugin)

Protected Functions

Type Name
void bake () const

Public Functions Documentation

function HandlerList

inline explicit endstone::HandlerList::HandlerList (
    std::string event
) 

function getHandlers

inline std::vector< EventHandler * > endstone::HandlerList::getHandlers () const

Get the baked registered handlers associated with this handler list

Returns:

the array of registered handlers


function registerHandler

inline EventHandler * endstone::HandlerList::registerHandler (
    std::unique_ptr< EventHandler > handler
) 

Register a new handler

Parameters:

  • handler Event handler to register

Returns:

the pointer to the registered handler


function unregister [½]

inline void endstone::HandlerList::unregister (
    const EventHandler & handler
) 

Remove a handler from a specific order slot

Parameters:

  • handler Event handler to remove

function unregister [2/2]

inline void endstone::HandlerList::unregister (
    const Plugin & plugin
) 

Remove a specific plugin's handlers from this handler

Parameters:


Protected Functions Documentation

function bake

inline void endstone::HandlerList::bake () const


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