Package me.totalfreedom.command
Class CommandHandler
java.lang.Object
me.totalfreedom.command.CommandHandler
Handles the registration of commands. The plugin which initializes this class should be the plugin that is
registering the commands.
-
Constructor Summary
ConstructorsConstructorDescriptionCommandHandler(org.bukkit.plugin.java.JavaPlugin plugin) Creates a new command handler. -
Method Summary
Modifier and TypeMethodDescription<T extends Commander>
voidregisterCommand(T command) Registers a command.
-
Constructor Details
-
CommandHandler
public CommandHandler(org.bukkit.plugin.java.JavaPlugin plugin) Creates a new command handler.- Parameters:
plugin- The plugin that this command handler is registered to.
-
-
Method Details
-
registerCommand
Registers a command. This method will automatically delegate the command information to the Bukkit API and register with theCommandMap.- Type Parameters:
T- The type of the command.- Parameters:
command- The command to register.
-