Class endstone::Event¶
Represents an event.
#include <endstone/event/event.h>
Inherited by the following classes: endstone::ActorEvent, endstone::BlockEvent, endstone::PlayerEvent, endstone::ServerEvent, endstone::WeatherEvent
Public Functions¶
Type | Name |
---|---|
Event (bool async=false) |
|
Event (const Event &) = delete |
|
virtual std::string | getEventName () const = 0 |
bool | isAsynchronous () const |
virtual bool | isCancellable () const = 0 |
bool | isCancelled () const |
Event & | operator= (const Event &) = delete |
void | setCancelled (bool cancel) |
virtual | ~Event () = default |
Public Functions Documentation¶
function Event [½]¶
function Event [2/2]¶
function getEventName¶
Gets a user-friendly identifier for this event.
Returns:
name of this event
function isAsynchronous¶
Any custom event that should not by synchronized with other events must use the specific constructor.
Returns:
false by default, true if the event fires asynchronously
function isCancellable¶
Whether the event can be cancelled by a plugin or the server.
Returns:
true if this event can be cancelled
function isCancelled¶
Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
Returns:
true if this event is cancelled
function operator=¶
function setCancelled¶
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
Parameters:
cancel
true if you wish to cancel this event
function ~Event¶
The documentation for this class was generated from the following file include/endstone/event/event.h