|
CommandAPI 12.1.0
An API for the command UI introduced in Minecraft 1.13
|
A builder to simplify creating Suggestions instances.
More...
Public Member Functions | |
| SuggestionsBuilder (final String input, final String inputLowerCase, final int start) | |
| SuggestionsBuilder (final String input, final int start) | |
| String | getInput () |
| Returns the full input this builder was created with. | |
| int | getStart () |
| Returns the start index of the suggestions in the input. | |
| String | getRemaining () |
| Returns the text that remains untouched by the suggestions. | |
| String | getRemainingLowerCase () |
| Returns the text that remains untouched by the suggestions in lowercase. | |
| Suggestions | build () |
Builds a Suggestions instance based on this builder. | |
| CompletableFuture< Suggestions > | buildFuture () |
| Builds the suggestions and returns the result in a future that instantly completes. | |
| SuggestionsBuilder | suggest (final String text) |
Suggests some replacement text for the entire range from getStart() to the end. | |
| SuggestionsBuilder | suggest (final String text, final Message tooltip) |
Suggests some replacement text for the entire range from getStart() to the end and provides a user readable tooltip. | |
| SuggestionsBuilder | suggest (final int value) |
Suggests some replacement integer for the entire range from getStart() to the end. | |
| SuggestionsBuilder | suggest (final int value, final Message tooltip) |
Suggests some replacement integer for the entire range from getStart() to the end and provides a user readable tooltip. | |
| SuggestionsBuilder | add (final SuggestionsBuilder other) |
| Adds all suggestions from another SuggestionsBuilder. | |
| SuggestionsBuilder | createOffset (final int start) |
| Create a new SuggestionsBuilder for the same input but a new start index. | |
| SuggestionsBuilder | restart () |
| Creates a builder with the same input and start index but no suggestions. | |
A builder to simplify creating Suggestions instances.
| SuggestionsBuilder com.mojang.brigadier.suggestion.SuggestionsBuilder.add | ( | final SuggestionsBuilder | other | ) |
Adds all suggestions from another SuggestionsBuilder.
| other | the other builder |
| Suggestions com.mojang.brigadier.suggestion.SuggestionsBuilder.build | ( | ) |
Builds a Suggestions instance based on this builder.
Suggestions instance based on this builder | CompletableFuture< Suggestions > com.mojang.brigadier.suggestion.SuggestionsBuilder.buildFuture | ( | ) |
Builds the suggestions and returns the result in a future that instantly completes.
| SuggestionsBuilder com.mojang.brigadier.suggestion.SuggestionsBuilder.createOffset | ( | final int | start | ) |
Create a new SuggestionsBuilder for the same input but a new start index.
| start | the new start index |
start | String com.mojang.brigadier.suggestion.SuggestionsBuilder.getInput | ( | ) |
Returns the full input this builder was created with.
| String com.mojang.brigadier.suggestion.SuggestionsBuilder.getRemaining | ( | ) |
Returns the text that remains untouched by the suggestions.
| String com.mojang.brigadier.suggestion.SuggestionsBuilder.getRemainingLowerCase | ( | ) |
Returns the text that remains untouched by the suggestions in lowercase.
| int com.mojang.brigadier.suggestion.SuggestionsBuilder.getStart | ( | ) |
Returns the start index of the suggestions in the input.
| SuggestionsBuilder com.mojang.brigadier.suggestion.SuggestionsBuilder.restart | ( | ) |
Creates a builder with the same input and start index but no suggestions.
It effectively creates a copy with nothing set, hence the term "restart".
| SuggestionsBuilder com.mojang.brigadier.suggestion.SuggestionsBuilder.suggest | ( | final int | value | ) |
Suggests some replacement integer for the entire range from getStart() to the end.
| value | the value to suggest |
| SuggestionsBuilder com.mojang.brigadier.suggestion.SuggestionsBuilder.suggest | ( | final int | value, |
| final Message | tooltip ) |
Suggests some replacement integer for the entire range from getStart() to the end and provides a user readable tooltip.
| value | the integer to suggest |
| tooltip | the tooltip to add to the suggestion |
| SuggestionsBuilder com.mojang.brigadier.suggestion.SuggestionsBuilder.suggest | ( | final String | text | ) |
Suggests some replacement text for the entire range from getStart() to the end.
| text | the text to suggest |
| SuggestionsBuilder com.mojang.brigadier.suggestion.SuggestionsBuilder.suggest | ( | final String | text, |
| final Message | tooltip ) |
Suggests some replacement text for the entire range from getStart() to the end and provides a user readable tooltip.
| text | the text to suggest |
| tooltip | the tooltip to add to the suggestion |