public static final class CommandExecuteEvent.CommandResult extends Object implements ResultedEvent.Result
CommandExecuteEvent.| Modifier and Type | Method and Description |
|---|---|
static CommandExecuteEvent.CommandResult |
allowed()
Allows the command to be sent, without modification.
|
static CommandExecuteEvent.CommandResult |
command(@NonNull String newCommand)
Allows the command to be executed, but silently replaced old command with another.
|
static CommandExecuteEvent.CommandResult |
denied()
Prevents the command from being executed.
|
static CommandExecuteEvent.CommandResult |
forwardToServer()
Prevents the command from being executed, but forward command to server.
|
static CommandExecuteEvent.CommandResult |
forwardToServer(@NonNull String newCommand)
Prevents the command from being executed on proxy, but forward command to server.
|
Optional<String> |
getCommand() |
boolean |
isAllowed()
Returns whether or not the event is allowed to proceed.
|
boolean |
isForwardToServer() |
String |
toString() |
public boolean isForwardToServer()
public boolean isAllowed()
ResultedEvent.ResultisAllowed in interface ResultedEvent.Resultpublic static CommandExecuteEvent.CommandResult allowed()
public static CommandExecuteEvent.CommandResult denied()
public static CommandExecuteEvent.CommandResult forwardToServer()
public static CommandExecuteEvent.CommandResult forwardToServer(@NonNull String newCommand)
newCommand - the command without first slash to use insteadpublic static CommandExecuteEvent.CommandResult command(@NonNull String newCommand)
newCommand - the command to use instead without first slash