Class CommandPreProcessEvent
java.lang.Object
eu.cloudnetservice.driver.event.Event
eu.cloudnetservice.node.event.command.CommandProcessEvent
eu.cloudnetservice.node.event.command.CommandPreProcessEvent
- All Implemented Interfaces:
eu.cloudnetservice.driver.event.Cancelable
public final class CommandPreProcessEvent
extends CommandProcessEvent
implements eu.cloudnetservice.driver.event.Cancelable
This event is called before the actual processing of the given command is done. To cancel the execution of the
backing command use
cancelled(boolean) and set it to true-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCommandPreProcessEvent(@NonNull Collection<String> tokenizedCommandInput, @NonNull eu.cloudnetservice.driver.command.CommandInfo command, @NonNull CommandSource commandSource, @NonNull CommandProvider commandProvider) -
Method Summary
Methods inherited from class CommandProcessEvent
command, commandProvider, commandSource, tokenizedCommandInput
-
Field Details
-
cancelled
private boolean cancelled
-
-
Constructor Details
-
CommandPreProcessEvent
public CommandPreProcessEvent(@NonNull @NonNull Collection<String> tokenizedCommandInput, @NonNull @NonNull eu.cloudnetservice.driver.command.CommandInfo command, @NonNull @NonNull CommandSource commandSource, @NonNull @NonNull CommandProvider commandProvider)
-
-
Method Details
-
cancelled
public boolean cancelled()- Specified by:
cancelledin interfaceeu.cloudnetservice.driver.event.Cancelable- Returns:
- if the command execution if cancelled
-
cancelled
public void cancelled(boolean cancelled) - Specified by:
cancelledin interfaceeu.cloudnetservice.driver.event.Cancelable- Parameters:
cancelled- whether this command execution should be cancelled or not.
-