Class PRerollCommand
java.lang.Object
com.ordwen.odailyquests.api.commands.player.PlayerMessages
com.ordwen.odailyquests.api.commands.player.PlayerCommandBase
com.ordwen.odailyquests.commands.player.handlers.PRerollCommand
- All Implemented Interfaces:
PlayerCommand
,PlayerCommandCompleter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Executes the command logic when the command is invoked by a player.getName()
Gets the name of the command.Gets the required permission to execute the command.protected void
invalidQuest
(org.bukkit.entity.Player player) Sends the invalid quest message to the sender.onTabComplete
(org.bukkit.command.CommandSender sender, String[] args) Provides tab-completion suggestions for the command.Methods inherited from class com.ordwen.odailyquests.api.commands.player.PlayerMessages
help, invalidCategory, noPermission, noPermissionCategory, playerOnly
-
Constructor Details
-
PRerollCommand
public PRerollCommand()
-
-
Method Details
-
getName
Description copied from interface:PlayerCommand
Gets the name of the command. This is used as the subcommand identifier (e.g.,/command <name>
).- Returns:
- the subcommand name
-
getPermission
Description copied from interface:PlayerCommand
Gets the required permission to execute the command.- Returns:
- the permission node as a string
-
execute
Description copied from interface:PlayerCommand
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
-
invalidQuest
protected void invalidQuest(org.bukkit.entity.Player player) Sends the invalid quest message to the sender. -
onTabComplete
Description copied from class:PlayerCommandBase
Provides tab-completion suggestions for the command.This method is called automatically by Bukkit when the user presses the TAB key while typing the command. By default, this implementation returns an empty list, which disables tab-completion.
To enable suggestions, override this method in your command class and return a list of possible completions. Returning
null
allows Bukkit to auto-complete player names.- Specified by:
onTabComplete
in interfacePlayerCommandCompleter
- Overrides:
onTabComplete
in classPlayerCommandBase
- Parameters:
sender
- the source of the command (player or console)args
- the current command arguments- Returns:
- a list of completions, an empty list to disable suggestions, or
null
to let Bukkit suggest player names
-