Command Aliases
Reregister command aliases with ease
Command aliases are registered by overriding the getCommandAliases() method.
Defining Aliases
If these are ever changed, you will need to re-register the command controller from the command registery explained below.
@Override
public GList<String> getCommandAliases()
{
return new GList<String>().qadd("set").qadd("of").qadd("aliases");
}
Dynamic Aliases & Re-Registry
Re-registering is simple. Just make sure you have modified your aliases (field variable) before re-registering.
//Fired from the CommandController in previous examples
Phantom.instance().getCommandRegistryController().unregister((CommandListener) this);
Phantom.instance().getCommandRegistryController().register((CommandListener) this);