Class CommandPostProcessEvent<S extends CommandSource>
java.lang.Object
studio.mevera.imperat.events.CommandEvent<S>
studio.mevera.imperat.events.types.CommandPostProcessEvent<S>
- All Implemented Interfaces:
CancellableEvent,Event
public class CommandPostProcessEvent<S extends CommandSource>
extends CommandEvent<S>
implements CancellableEvent
-
Field Summary
Fields inherited from class studio.mevera.imperat.events.CommandEvent
command -
Constructor Summary
ConstructorsConstructorDescriptionCommandPostProcessEvent(Command<S> command, ExecutionContext<S> context) Constructs a new command event. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this event has been cancelled.voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.Methods inherited from class studio.mevera.imperat.events.CommandEvent
getCommand
-
Constructor Details
-
CommandPostProcessEvent
Constructs a new command event.- Parameters:
command- the command associated with this event
-
-
Method Details
-
getContext
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableEventChecks if this event has been cancelled.- Specified by:
isCancelledin interfaceCancellableEvent- Returns:
trueif the event is cancelled,falseotherwise
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:CancellableEventSets the cancellation state of this event.Setting this to
truetypically indicates that the main action associated with this event should not proceed. However, handlers must explicitly checkCancellableEvent.isCancelled()and decide how to respond.- Specified by:
setCancelledin interfaceCancellableEvent- Parameters:
cancelled-trueto cancel the event,falseto un-cancel it
-