Command Registration
To be able to use any command, you will have to register it. The register
method takes in two parameters:
- The
JavaPlugin
instance for this command to be registered in. - The prefix this command will be registered in.
These two can be omitted if already set in StellarConfig.
Commands are registered under two names: the base command name (/admin) and the command name with its prefix (/staffplugin:admin).
Java
public class Main extends JavaPlugin {
@Override
public void onEnable() {
new StellarCommand("admin")
.register(this, "myserver");
}
}