Interface AdminCommand

All Known Implementing Classes:
AddCommand, AdminCommandBase, ARerollCommand, AShowCommand, CompleteCommand, ConvertCommand, CustomCompleteCommand, OpenCommand, RemoveCommand, ResetCommand

public interface AdminCommand
Represents an administrative subcommand that can be executed through the plugin's admin command system.

Implementing classes must define the execution logic, the name of the subcommand, and the required permission. These commands are typically registered in an AdminCommandRegistry.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(org.bukkit.command.CommandSender sender, String[] args)
    Executes the command logic when the command is invoked.
    Gets the name of the command.
    Gets the required permission to execute the command.
  • Method Details

    • execute

      void execute(org.bukkit.command.CommandSender sender, String[] args)
      Executes the command logic when the command is invoked.
      Parameters:
      sender - the command sender (can be a player or the console)
      args - the arguments passed to the command
    • getName

      String getName()
      Gets the name of the command. This is used as the subcommand identifier (e.g., /command <name>).
      Returns:
      the subcommand name
    • getPermission

      String getPermission()
      Gets the required permission to execute the command.
      Returns:
      the permission node as a string