Interface CommandRegistry


public interface CommandRegistry
Handles and manages all sub-commands for the plugin.
  • Method Details

    • addSubCommand

      void addSubCommand(ACommand aCommand)
      Register a sub-command to the registry.
      Parameters:
      aCommand - The command instance.
    • removeSubCommand

      void removeSubCommand(String name)
      Removes a sub-command from the registry.
      Parameters:
      name - The command name from ACommand.name.
    • getCommands

      List<ACommand> getCommands()
      Retrieve a list of all the sub-commands added via addSubCommand(ACommand) This doesn't include internal sub-commands provided by the plugin.
      Returns:
      List of all the sub-commands.
    • executeCommand

      void executeCommand(Player player, String command)
      Execute a config command with the correct syntax.
      Parameters:
      player - Player the command will be executed on.
      command - The command syntax.
    • registerCommandPlaceholder

      void registerCommandPlaceholder(String placeholder, Function<Player,String> value)
      Register a config command placeholder.
      Parameters:
      placeholder - The placeholder to replace.
      value - The value to replace the placeholder with.