Skip to content

Class endstone::HandlerList

ClassList > endstone > HandlerList

A list of event handlers. More...

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

Public Functions

Type Name
HandlerList (std::string event)
std::vector< EventHandler * > getHandlers () const
Get the baked registered handlers associated with this handler list.
EventHandler * registerHandler (std::unique_ptr< EventHandler > handler)
Register a new handler.
void unregister (const EventHandler & handler)
Remove a handler from a specific order slot.
void unregister (const Plugin & plugin)
Remove a specific plugin's handlers from this handler.

Protected Functions

Type Name
void bake () const

Detailed Description

Should be instantiated on a per-event basis.

Public Functions Documentation

function HandlerList

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

function getHandlers

Get the baked registered handlers associated with this handler list.

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

Returns:

the array of registered handlers


function registerHandler

Register a new handler.

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

Parameters:

  • handler Event handler to register

Returns:

the pointer to the registered handler


function unregister [½]

Remove a handler from a specific order slot.

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

Parameters:

  • handler Event handler to remove

function unregister [2/2]

Remove a specific plugin's handlers from this handler.

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

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