public class HelpCommand extends Command
outputColor, outputMessage| Constructor and Description |
|---|
HelpCommand() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(java.lang.String[] params)
The method that checks the validity of a parameters String array for this command.
You should never really have to explicitly call this method. |
void |
execute(java.lang.String[] params)
The execute code.
You should never really have to explicitly call this method. |
java.lang.String |
getCommand()
Gets this command as a String.
|
java.lang.String |
getHelpMessage()
Gets this command's help message.
|
int |
getMaxParams()
Gets the maximum number of parameters this command can be used with.
|
int |
getMinParams()
Gets the minimum number of parameters this command can be used with.
|
java.lang.String |
getUsage()
Gets the proper usage of this command.
|
checkAndExecute, getOutputColor, missingParameters, tooManyParameters, toStringpublic boolean check(java.lang.String[] params)
CommandCommand.checkAndExecute(String[]) instead.
The default check method simply checks if the length of the String array of parameters falls within the bounds of Command.getMinParams() and Command.getMaxParams() of this command.
public void execute(java.lang.String[] params)
CommandCommand.checkAndExecute(String[]) instead.
Simply put whatever code you'd like to be run in here, and when this command is executed the code will be run.
public java.lang.String getCommand()
CommandgetCommand in class Commandpublic java.lang.String getHelpMessage()
CommandgetHelpMessage in class Commandpublic java.lang.String getUsage()
Commandpublic int getMaxParams()
CommandgetMaxParams in class Commandpublic int getMinParams()
CommandgetMinParams in class Command