Interface PlayerCommand

All Known Implementing Classes:
MeCommand, PlayerCommandBase, PRerollCommand, PShowCommand

public interface PlayerCommand
Represents a player subcommand that can be executed through the plugin's player command system.

Implementing classes must define the command logic, the name of the subcommand, and the required permission. These commands are intended to be used by players only (not the console), and are typically registered in the PlayerCommandRegistry.

  • Method Summary

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

    • 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
    • execute

      void execute(org.bukkit.entity.Player player, String[] args)
      Executes the command logic when the command is invoked by a player.
      Parameters:
      player - the player executing the command
      args - the arguments passed to the command