public abstract class AbstractCancellable extends AbstractEvent implements Cancellable
Cancellable
, used to prevent
the need to pass in 'cancelled' to the event factory.
This class was actually created because @Aaron1011 didn't want to add yet another annotation for the event generator.
Modifier and Type | Field and Description |
---|---|
protected boolean |
cancelled |
callbacks
Constructor and Description |
---|
AbstractCancellable() |
Modifier and Type | Method and Description |
---|---|
boolean |
isCancelled()
Gets if the
Event has been cancelled. |
void |
setCancelled(boolean cancelled)
Sets the cancelled state of the
Event . |
getCallbacks, init
public boolean isCancelled()
Cancellable
Event
has been cancelled.isCancelled
in interface Cancellable
public void setCancelled(boolean cancelled)
Cancellable
Event
.
This will also cancel any callbacks on the event if cancel
is true
. However, no callbacks will be un-cancelled if
cancel
is false
.
setCancelled
in interface Cancellable
cancelled
- The new cancelled state