Class DimensionsCommandManager

java.lang.Object
me.xxastaspastaxx.dimensions.commands.DimensionsCommandManager
All Implemented Interfaces:
org.bukkit.command.CommandExecutor

public class DimensionsCommandManager extends Object implements org.bukkit.command.CommandExecutor
Class to register and manage the Dimensions commands
  • Constructor Details

    • DimensionsCommandManager

      public DimensionsCommandManager(Dimensions main)
      Contruct the manager and set the command executor for the command /dimensions
      Parameters:
      main - the instance of the Dimensions lpugin
  • Method Details

    • onCommand

      public boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command cmd, String label, String[] args)
      Check if the command is registered and execute it
      Specified by:
      onCommand in interface org.bukkit.command.CommandExecutor
    • getCommands

      public ArrayList<DimensionsCommand> getCommands()
      Get the list of the non-admin commands
      Returns:
      the list of the non-admin commands
    • getAdminCommands

      public ArrayList<DimensionsCommand> getAdminCommands()
      Get the list of the admin commands
      Returns:
      the list of the admin commands
    • registerCommand

      public void registerCommand(DimensionsCommand cmd)
      Register a new DimensionsCommand
      Parameters:
      cmd - the command instance
    • unregisterCommand

      public void unregisterCommand(DimensionsCommand cmd)
      Unregister a command
      Parameters:
      cmd - the instance of the command