CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
|
A provider that generates suggestions based on a context and adds them to a builder it then returns. More...
Public Member Functions | |
CompletableFuture< Suggestions > | getSuggestions (final CommandContext< S > context, final SuggestionsBuilder builder) throws CommandSyntaxException |
Computes suggestions for the given CommandContext and adds them to the given SuggestionsBuilder , which is then build and returned in the future. More... | |
A provider that generates suggestions based on a context and adds them to a builder it then returns.
As looking up the suggestions might involve about anything, from querying game state to I/O, the method returns a CompletableFuture
and no guarantees are made about its execution.
<S> | the type of the command source |
CompletableFuture< Suggestions > com.mojang.brigadier.suggestion.SuggestionProvider< S >.getSuggestions | ( | final CommandContext< S > | context, |
final SuggestionsBuilder | builder | ||
) | throws CommandSyntaxException |
Computes suggestions for the given CommandContext
and adds them to the given SuggestionsBuilder
, which is then build and returned in the future.
context | the command context to as a base |
builder | the builder to add them to |
CommandSyntaxException | if an error occurs parsing the context to return a valid suggestion |