A builder to simplify creating Suggestions
instances.
More...
A builder to simplify creating Suggestions
instances.
◆ add()
◆ build()
Suggestions com.mojang.brigadier.suggestion.SuggestionsBuilder.build |
( |
| ) |
|
◆ buildFuture()
CompletableFuture< Suggestions > com.mojang.brigadier.suggestion.SuggestionsBuilder.buildFuture |
( |
| ) |
|
Builds the suggestions and returns the result in a future that instantly completes.
- Returns
- a future for the built Suggestions
◆ createOffset()
SuggestionsBuilder com.mojang.brigadier.suggestion.SuggestionsBuilder.createOffset |
( |
final int |
start | ) |
|
Create a new SuggestionsBuilder for the same input but a new start index.
- Parameters
-
- Returns
- the new builder with the same input, no suggestions and starting at
start
◆ getInput()
String com.mojang.brigadier.suggestion.SuggestionsBuilder.getInput |
( |
| ) |
|
Returns the full input this builder was created with.
- Returns
- the input
◆ getRemaining()
String com.mojang.brigadier.suggestion.SuggestionsBuilder.getRemaining |
( |
| ) |
|
Returns the text that remains untouched by the suggestions.
- Returns
- the text that remains untouched by the suggestions
◆ getRemainingLowerCase()
String com.mojang.brigadier.suggestion.SuggestionsBuilder.getRemainingLowerCase |
( |
| ) |
|
Returns the text that remains untouched by the suggestions in lowercase.
- Returns
- the text that remains untouched by the suggestions in lowercase
◆ getStart()
int com.mojang.brigadier.suggestion.SuggestionsBuilder.getStart |
( |
| ) |
|
Returns the start index of the suggestions in the input.
- Returns
- the start index of the suggestions in the input
◆ 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".
- Returns
- the new builder with the same input and start index, but no suggestions
- See also
- createOffset
◆ suggest() [1/4]
SuggestionsBuilder com.mojang.brigadier.suggestion.SuggestionsBuilder.suggest |
( |
final int |
value | ) |
|
Suggests some replacement integer for the entire range from getStart()
to the end.
- Parameters
-
value | the value to suggest |
- Returns
- this builder
◆ suggest() [2/4]
Suggests some replacement integer for the entire range from getStart()
to the end and provides a user readable tooltip.
- Parameters
-
value | the integer to suggest |
tooltip | the tooltip to add to the suggestion |
- Returns
- this builder
◆ suggest() [3/4]
SuggestionsBuilder com.mojang.brigadier.suggestion.SuggestionsBuilder.suggest |
( |
final String |
text | ) |
|
Suggests some replacement text for the entire range from getStart()
to the end.
- Parameters
-
- Returns
- this builder
◆ suggest() [4/4]
Suggests some replacement text for the entire range from getStart()
to the end and provides a user readable tooltip.
- Parameters
-
text | the text to suggest |
tooltip | the tooltip to add to the suggestion |
- Returns
- this builder