Skip to content

Class endstone::Cancellable

template <typename EventType>

ClassList > endstone > Cancellable

A type characterizing events that may be cancelled by a plugin or the server.

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

Inherits the following classes: EventType, endstone::ICancellable

Public Functions

Type Name
virtual void cancel ()
Cancel this event.
virtual bool isCancelled () override const
Gets the cancellation state of this event.
virtual void setCancelled (bool cancel) override
Sets the cancellation state of this event.

Public Functions inherited from endstone::ICancellable

See endstone::ICancellable

Type Name
virtual void cancel () = 0
Cancels this event.
virtual bool isCancelled () const = 0
Gets the cancellation state of this event.
virtual void setCancelled (bool cancel) = 0
Sets the cancellation state of this event.
virtual ~ICancellable () = default

Public Functions Documentation

function cancel

Cancel this event.

inline virtual void endstone::Cancellable::cancel () 

A cancelled event will not be executed in the server, but will still pass to other plugins.

Implements endstone::ICancellable::cancel


function isCancelled

Gets the cancellation state of this event.

inline virtual bool endstone::Cancellable::isCancelled () override const

A cancelled event will not be executed in the server, but will still pass to other plugins.

Returns:

true if this event is cancelled

Implements endstone::ICancellable::isCancelled


function setCancelled

Sets the cancellation state of this event.

inline virtual void endstone::Cancellable::setCancelled (
    bool cancel
) override

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

Implements endstone::ICancellable::setCancelled



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