Package valorless.rarespawns
Class TabCompletion
java.lang.Object
valorless.rarespawns.TabCompletion
- All Implemented Interfaces:
org.bukkit.command.TabCompleter
Tab completer for RareSpawns commands.
Provides context-aware suggestions for subcommands and arguments based on the sender's permissions and current argument position. Supported subcommands include: reload, item, give, spawn, and kill.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiononTabComplete(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String alias, String[] args) Computes tab-completion candidates for RareSpawns.
-
Constructor Details
-
TabCompletion
public TabCompletion()
-
-
Method Details
-
onTabComplete
public List<String> onTabComplete(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String alias, String[] args) Computes tab-completion candidates for RareSpawns.Behavior:
- args[0]: suggests subcommands permitted for the sender.
- args[1]: suggests sub-args for reload (abilities, config, entities, items, soulpowers), item (configured item ids), spawn (configured entity ids), kill (<radius>), give (online player names).
- args[2]: suggests online player names for spawn and "random" for item, and item ids for give subcommand.
- args[3]: suggests "random" for give subcommand.
.invalid reference
StringUtil#copyPartialMatches(String, java.util.List, java.util.List)- Specified by:
onTabCompletein interfaceorg.bukkit.command.TabCompleter- Parameters:
sender- the command sender requesting suggestionscommand- the command being executedalias- the alias used to invoke the commandargs- the raw arguments passed so far- Returns:
- a list of suggestions (never null)
-