|
CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
|
This class represents safe suggestions. More...
Public Member Functions | |
| ArgumentSuggestions< CommandSender > | toSuggestions (Function< S, String > mapper) |
Convert this SafeSuggestions object into an ArgumentSuggestions by mapping the values with a string mapping function. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | empty () |
| Create an empty SafeSuggestions object. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | suggest (T... suggestions) |
| Hardcode an array of values to suggest. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | suggest (Collection< T > suggestions) |
| Hardcode a collection of values to suggest. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | suggest (Function< SuggestionInfo< CommandSender >, T[]> suggestions) |
| Suggest an array of values as the result of a function. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | suggestCollection (Function< SuggestionInfo< CommandSender >, Collection< T > > suggestions) |
| Suggest a collection of values as the result of a function. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | suggestAsync (Function< SuggestionInfo< CommandSender >, CompletableFuture< T[]> > suggestions) |
| Suggest an array of values provided asynchronously. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | suggestCollectionAsync (Function< SuggestionInfo< CommandSender >, CompletableFuture< Collection< T > > > suggestions) |
| Suggest a collection of values provided asynchronously. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | tooltips (Tooltip< T >... suggestions) |
| Suggest an array of hardcoded values with tooltips. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | tooltips (Collection< Tooltip< T > > suggestions) |
| Suggest a collection of hardcoded values with tooltips. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | tooltips (Function< SuggestionInfo< CommandSender >, Tooltip< T >[]> suggestions) |
| Suggest an array of values with tooltips as the result of a function. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | tooltipCollection (Function< SuggestionInfo< CommandSender >, Collection< Tooltip< T > > > suggestions) |
| Suggest a collection of values with tooltips as the result of a function. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | tooltipsAsync (Function< SuggestionInfo< CommandSender >, CompletableFuture< Tooltip< T >[]> > suggestions) |
| Suggest an array of values with tooltips asynchronously. More... | |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > | tooltipCollectionAsync (Function< SuggestionInfo< CommandSender >, CompletableFuture< Collection< Tooltip< T > > > > suggestions) |
| Suggest a collection of values with tooltips asynchronously. More... | |
This class represents safe suggestions.
These are parameterized suggestions which can be converted into a string under a mapping function. SafeSuggestions instances are best created using the static methods as opposed to functionally.
| <S> | the type of the suggestions |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.empty | ( | ) |
Create an empty SafeSuggestions object.
| <T> | type parameter of the SafeSuggestions object |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.suggest | ( | Collection< T > | suggestions | ) |
Hardcode a collection of values to suggest.
| suggestions | collection of hardcoded values |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.suggest | ( | Function< SuggestionInfo< CommandSender >, T[]> | suggestions | ) |
Suggest an array of values as the result of a function.
| suggestions | function providing the array of values |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.suggest | ( | T... | suggestions | ) |
Hardcode an array of values to suggest.
| suggestions | array of hardcoded values |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.suggestAsync | ( | Function< SuggestionInfo< CommandSender >, CompletableFuture< T[]> > | suggestions | ) |
Suggest an array of values provided asynchronously.
| suggestions | function providing the array of values asynchronously |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.suggestCollection | ( | Function< SuggestionInfo< CommandSender >, Collection< T > > | suggestions | ) |
Suggest a collection of values as the result of a function.
| suggestions | function providing the collection of values |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.suggestCollectionAsync | ( | Function< SuggestionInfo< CommandSender >, CompletableFuture< Collection< T > > > | suggestions | ) |
Suggest a collection of values provided asynchronously.
| suggestions | function providing the collection of values asynchronously |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.tooltipCollection | ( | Function< SuggestionInfo< CommandSender >, Collection< Tooltip< T > > > | suggestions | ) |
Suggest a collection of values with tooltips as the result of a function.
| suggestions | function providing the collection of values with tooltips |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.tooltipCollectionAsync | ( | Function< SuggestionInfo< CommandSender >, CompletableFuture< Collection< Tooltip< T > > > > | suggestions | ) |
Suggest a collection of values with tooltips asynchronously.
| suggestions | function providing the array of values with tooltips asynchronously |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.tooltips | ( | Collection< Tooltip< T > > | suggestions | ) |
Suggest a collection of hardcoded values with tooltips.
| suggestions | collection of hardcoded values with their tooltips |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.tooltips | ( | Function< SuggestionInfo< CommandSender >, Tooltip< T >[]> | suggestions | ) |
Suggest an array of values with tooltips as the result of a function.
| suggestions | function providing the array of values with tooltips |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.tooltips | ( | Tooltip< T >... | suggestions | ) |
Suggest an array of hardcoded values with tooltips.
| suggestions | array of hardcoded values with their tooltips |
| <T> | type of the values |
| static< T, CommandSender > SafeSuggestions< T, CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.tooltipsAsync | ( | Function< SuggestionInfo< CommandSender >, CompletableFuture< Tooltip< T >[]> > | suggestions | ) |
Suggest an array of values with tooltips asynchronously.
| suggestions | function providing the collection of values with tooltips asynchronously |
| <T> | type of the values |
| ArgumentSuggestions< CommandSender > dev.jorel.commandapi.arguments.SafeSuggestions< S, CommandSender >.toSuggestions | ( | Function< S, String > | mapper | ) |
Convert this SafeSuggestions object into an ArgumentSuggestions by mapping the values with a string mapping function.
| mapper | a function which maps an instance of S to a string. |
ArgumentSuggestions object resulting from this mapping.