CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
|
An argument that represents a command. More...
Public Member Functions | |
CommandArgument (String nodeName) | |
Constructs a CommandArgument with the given node name. More... | |
final CommandArgument | replaceSuggestions (ArgumentSuggestions< CommandSender >... suggestions) |
Replaces the default command suggestions provided by the server with custom suggestions for each argument in the command, starting with the command's name. More... | |
CommandArgument | replaceSuggestions (ArgumentSuggestions< CommandSender > suggestions) |
Replaces the default command suggestions provided by the server with custom suggestions for each argument in the command, starting with the command's name. More... | |
final Argument< CommandResult > | branchSuggestions (SuggestionsBranch< CommandSender >... branches) |
Adds SuggestionsBranch to this CommandArgument. More... | |
Class< CommandResult > | getPrimitiveType () |
CommandAPIArgumentType | getArgumentType () |
Argument< T > | instance () |
Returns the instance of this class with the class Impl. More... | |
An argument that represents a command.
This allows users to enter the name and arguments of any other command as an argument to this command.
@apiNote Returns a CommandResult
object
dev.jorel.commandapi.arguments.CommandArgument.CommandArgument | ( | String | nodeName | ) |
Constructs a CommandArgument
with the given node name.
nodeName | the name of the node for this argument |
final Argument< CommandResult > dev.jorel.commandapi.arguments.CommandArgument.branchSuggestions | ( | SuggestionsBranch< CommandSender >... | branches | ) |
Adds SuggestionsBranch
to this CommandArgument.
After going through the suggestions provided by CommandArgument#replaceSuggestions(ArgumentSuggestions...)
the suggestions of these branches will be used.
branches | An array of SuggestionsBranch representing the branching suggestions. Use SuggestionsBranch#suggest(ArgumentSuggestions...) to start creating these. |
|
inherited |
Returns the instance of this class with the class Impl.
Used for chaining builder methods.
CommandArgument dev.jorel.commandapi.arguments.CommandArgument.replaceSuggestions | ( | ArgumentSuggestions< CommandSender > | suggestions | ) |
Replaces the default command suggestions provided by the server with custom suggestions for each argument in the command, starting with the command's name.
If a suggestion is null or there isn't any suggestions given for that argument, the suggestions will not be overridden.
suggestions | An array of ArgumentSuggestions representing the suggestions. Use the static methods in ArgumentSuggestions to create these. |
final CommandArgument dev.jorel.commandapi.arguments.CommandArgument.replaceSuggestions | ( | ArgumentSuggestions< CommandSender >... | suggestions | ) |
Replaces the default command suggestions provided by the server with custom suggestions for each argument in the command, starting with the command's name.
If a suggestion is null or there isn't any suggestions given for that argument, the suggestions will not be overridden.
suggestions | An array of ArgumentSuggestions representing the suggestions. Use the static methods in ArgumentSuggestions to create these. |