Class CommandHandler

java.lang.Object
me.totalfreedom.command.CommandHandler

public class CommandHandler extends Object
Handles the registration of commands. The plugin which initializes this class should be the plugin that is registering the commands.
  • 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

      public <T extends Commander> void registerCommand(T command)
      Registers a command. This method will automatically delegate the command information to the Bukkit API and register with the CommandMap.
      Type Parameters:
      T - The type of the command.
      Parameters:
      command - The command to register.