1. use template "CommandNew"
2. Rename "CommandNew to "Command + YourName"
3. fill constructor with your keyword and number of params
public CommandNew()
{
super.keyword = "your-keyword";
super.numberOfParams = 0;
super.helptText = "help.your-keyword";
}
isValid()
check
4. in execute method implement your code after the Note:
-
command[0]
is the commandname,command[1]
ist the first useabel paramater - you can use
bundle.getController().print(message);
to print a result to the console - if you have to enter custom variables in the command you have to pass them via the
CommandBundle
PossibleCommands
5. add your Command to
_en.properties
!IMPORTANT
6. implement help text in For additional examples look into included standard commands (list, help, clear)