@ApiStatus.Experimental public class CommandExecutorFoundEvent<SENDER> extends java.lang.Object implements CommandExecutorEvent<SENDER>
| Constructor and Description |
|---|
CommandExecutorFoundEvent(Invocation<SENDER> invocation,
CommandExecutor<SENDER> executor,
CommandExecutorMatchResult matchResult) |
| Modifier and Type | Method and Description |
|---|---|
void |
allow() |
void |
cancel(FailedReason reason)
Will stop the execution of the command.
|
@Nullable FailedReason |
getCancelReason() |
CommandExecutor<SENDER> |
getExecutor() |
Invocation<SENDER> |
getInvocation() |
CommandExecutorMatchResult |
getResult() |
boolean |
isCancelled() |
void |
setResult(CommandExecutorMatchResult result)
Will skip the execution of the command if the result is failed.
|
public CommandExecutorFoundEvent(Invocation<SENDER> invocation, CommandExecutor<SENDER> executor, CommandExecutorMatchResult matchResult)
public Invocation<SENDER> getInvocation()
getInvocation in interface CommandExecutorEvent<SENDER>public CommandExecutor<SENDER> getExecutor()
getExecutor in interface CommandExecutorEvent<SENDER>public CommandExecutorMatchResult getResult()
public void setResult(CommandExecutorMatchResult result)
public void cancel(FailedReason reason)
public void allow()
public boolean isCancelled()
@Nullable public @Nullable FailedReason getCancelReason()