public class CommandEvent extends Event
CommandHandler.executeCommand(ICommandSender, String)
and ClientCommandHandler.executeCommand(ICommandSender, String)
. command
contains the instance of ICommand which is representative of the currently executing command.sender
contains the instance of ICommandSender for the given command sender.parameters
contains the arguments passed for the command execution.exception
begins null, but can be populated with an exception to be thrown within the command.Cancelable
. HasResult
MinecraftForge.EVENT_BUS
.Event.HasResult, Event.Result
Constructor and Description |
---|
CommandEvent(ICommand command,
ICommandSender sender,
java.lang.String[] parameters) |
Modifier and Type | Method and Description |
---|---|
ICommand |
getCommand() |
java.lang.Throwable |
getException() |
java.lang.String[] |
getParameters() |
ICommandSender |
getSender() |
void |
setException(java.lang.Throwable exception) |
void |
setParameters(java.lang.String[] parameters) |
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public CommandEvent(ICommand command, ICommandSender sender, java.lang.String[] parameters)
public ICommand getCommand()
public ICommandSender getSender()
public java.lang.String[] getParameters()
public void setParameters(java.lang.String[] parameters)
public java.lang.Throwable getException()
public void setException(java.lang.Throwable exception)