-
- 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 Player
player
private final List<String>
args
private final JavaPlugin
plugin
private final Command<T>
command
private final CommandSender
sender
private final World
world
private final Server
server
private final String
message
private final List<Object>
typedArgs
-
Method Summary
Modifier and Type Method Description final Player
getPlayer()
The player who is about to execute the command. final List<String>
getArgs()
Command arguments. final JavaPlugin
getPlugin()
Your plugin. final Command<T>
getCommand()
Executed command. final CommandSender
getSender()
Executed command sender. final World
getWorld()
The world where the command was executed final Server
getServer()
The server on which the plugin was run final String
getMessage()
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.
-
-
-
-