Interface PlayerCommandCompleter
- All Known Implementing Classes:
MeCommand
,PlayerCommandBase
,PRerollCommand
,PShowCommand
public interface PlayerCommandCompleter
Interface for providing tab-completion suggestions for player commands.
This interface is used to offer context-aware tab-completion for commands in Minecraft.
Implementing classes should define the onTabComplete(CommandSender, String[])
method
to provide custom completions for commands, such as subcommands, player names, or other dynamic options.
-
Method Summary
Modifier and TypeMethodDescriptiononTabComplete
(org.bukkit.command.CommandSender sender, String[] args) Provides tab-completion suggestions for the command.
-
Method Details
-
onTabComplete
Provides tab-completion suggestions for the command.This method is invoked by Bukkit when the user presses the TAB key while typing the command. It allows you to offer context-aware completions, such as subcommands, player names, or other dynamic options.
Returning
null
will let Bukkit suggest player names automatically. Returning an empty list disables tab-completion suggestions for the current argument.- Parameters:
sender
- the command sender (can be a player or the console)args
- the current arguments entered for the command- Returns:
- a list of possible completions, or an empty list if no completions are available, or
null
to allow Bukkit to automatically complete player names
-