-
- All Implemented Interfaces:
public final class SuggestionBuilder<T extends Object>A builder that creates a list of suggestions.
-
-
Field Summary
Fields Modifier and Type Field Description private final Playerplayerprivate final List<String>argsprivate final JavaPluginpluginprivate final Command<T>commandprivate final CommandSendersenderprivate final Worldworldprivate final Serverserverprivate final Stringmessageprivate final List<Object>typedArgs
-
Method Summary
Modifier and Type Method Description final PlayergetPlayer()The player who is about to execute the command. final List<String>getArgs()Command arguments. final JavaPlugingetPlugin()Your plugin. final Command<T>getCommand()Executed command. final CommandSendergetSender()Executed command sender. final WorldgetWorld()The world where the command was executed final ServergetServer()The server on which the plugin was run final StringgetMessage()Command input message. final List<Object>getTypedArgs()final SuggestionBuilder<T>suggest(String content, String tooltip)Suggest content. final SuggestionBuilder<T>suggest(String content)Suggest content. final SuggestionBuilder<T>suggestAll(List<String> contents)Suggest multiple content. -
-
Method Detail
-
getPlayer
final Player getPlayer()
The player who is about to execute the command.
-
getArgs
final List<String> getArgs()
Command arguments. The remaining arguments except the beginning of the command are assigned. These are all returned as strings. If you need parsed values, see typedArgs.
/command <number> args: <number>
/parent children <arg1><arg2> args: <arg1>, <arg2>
/command <literal><text><number><entity> args: <literal>, <text>, <number>, <entity>
-
getPlugin
final JavaPlugin getPlugin()
Your plugin.
-
getCommand
final Command<T> getCommand()
Executed command.
-
getSender
final CommandSender getSender()
Executed command sender. (It doesn't matter if you are a player or not.)
-
getWorld
final World getWorld()
The world where the command was executed
-
getServer
final Server getServer()
The server on which the plugin was run
-
getMessage
final String getMessage()
Command input message.
-
getTypedArgs
final List<Object> getTypedArgs()
-
suggest
@JvmOverloads() final SuggestionBuilder<T> suggest(String content, String tooltip)
Suggest content.
Tooltips: The string displayed when the mouse hovers over a suggestion.
-
suggest
@JvmOverloads() final SuggestionBuilder<T> suggest(String content)
Suggest content.
Tooltips: The string displayed when the mouse hovers over a suggestion.
-
suggestAll
final SuggestionBuilder<T> suggestAll(List<String> contents)
Suggest multiple content.
-
-
-
-