Class CommandExecutorFoundEvent<SENDER>
java.lang.Object
dev.rollczi.litecommands.command.executor.event.CommandExecutorFoundEvent<SENDER>
- All Implemented Interfaces:
CommandExecutorEvent<SENDER>,Event
@Experimental
public class CommandExecutorFoundEvent<SENDER>
extends Object
implements CommandExecutorEvent<SENDER>
-
Constructor Summary
ConstructorsConstructorDescriptionCommandExecutorFoundEvent(Invocation<SENDER> invocation, CommandExecutor<SENDER> executor, CommandExecutorMatchResult matchResult) -
Method Summary
Modifier and TypeMethodDescriptionvoidallow()voidcancel(FailedReason reason) Will stop the execution of the command.@Nullable FailedReasonbooleanvoidsetResult(CommandExecutorMatchResult result) Will skip the execution of the command if the result is failed.
-
Constructor Details
-
CommandExecutorFoundEvent
public CommandExecutorFoundEvent(Invocation<SENDER> invocation, CommandExecutor<SENDER> executor, CommandExecutorMatchResult matchResult)
-
-
Method Details
-
getInvocation
- Specified by:
getInvocationin interfaceCommandExecutorEvent<SENDER>
-
getExecutor
- Specified by:
getExecutorin interfaceCommandExecutorEvent<SENDER>
-
getResult
-
setResult
Will skip the execution of the command if the result is failed. -
allow
public void allow() -
isCancelled
public boolean isCancelled() -
getCancelReason
-