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
-
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
Executes the command logic when the command is invoked by a player.- Parameters:
player
- the player executing the commandargs
- the arguments passed to the command
-