Commands
Extends
Overrides
String, should return your command name.
This method is called each time the command is ran, args would be the additional command arguments provided.
Array of command aliases, this lets you assign several aliases to the parent command.
If not overriden it will be left empty.
Boolean, lets you tab-complete player names in your world if it returns true.
If not overriden it will be false.
Registering
You will need to register your commands on init.
Example
public class ExampleCommand extends ClientCommand {
@Override
public String getName() {
return ("examplecommand");
}
@Override
public void process(String[] args) throws CommandException {
Meowtils.addMessage("Command ran!");
}
// Optional; Don't override if you won't use this
@Override
public List<String> getAliases() {
return Arrays.asList("examplecommand2", "examplecommand3");
}
// Optional; Don't override this if you don't need it
@Override
public boolean tabCompleteNames() {
return true;
}
}