Class PlayerCommandBase
java.lang.Object
com.ordwen.odailyquests.api.commands.player.PlayerMessages
com.ordwen.odailyquests.api.commands.player.PlayerCommandBase
- All Implemented Interfaces:
PlayerCommand
,PlayerCommandCompleter
- Direct Known Subclasses:
MeCommand
,PRerollCommand
,PShowCommand
public abstract class PlayerCommandBase
extends PlayerMessages
implements PlayerCommand, PlayerCommandCompleter
Base class providing common functionality for player-related commands.
This abstract class implements the PlayerCommand
and PlayerCommandCompleter
interfaces,
offering default behaviors for both command execution and tab-completion handling.
Subclasses of this class can implement specific command logic and customize tab-completion behavior.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiononTabComplete
(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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ordwen.odailyquests.api.commands.player.PlayerCommand
execute, getName, getPermission
-
Constructor Details
-
PlayerCommandBase
public PlayerCommandBase()
-
-
Method Details
-
onTabComplete
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
- 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
-