Package dev.jorel.commandapi.arguments
Class ListArgumentBuilder.ListArgumentBuilderSuggests
java.lang.Object
dev.jorel.commandapi.arguments.ListArgumentBuilder.ListArgumentBuilderSuggests
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionwithMapper(Function<T, String> mapper) Specifies the mapping function of the specific typeTto aStringso an element can be shown to a user as suggestions.Specifies that the mapping function for this argument calls thetoString()method.withStringTooltipMapper(Function<T, IStringTooltip> mapper) Specifies the mapping function of the specific typeTto aIStringTooltipso an element can be shown to a user as a suggestion with a tooltip.
-
Method Details
-
withStringMapper
public ListArgumentBuilder<T>.ListArgumentBuilderSuggests.ListArgumentBuilderFinished withStringMapper()Specifies that the mapping function for this argument calls thetoString()method.- Returns:
- this list argument builder
-
withMapper
public ListArgumentBuilder<T>.ListArgumentBuilderSuggests.ListArgumentBuilderFinished withMapper(Function<T, String> mapper) Specifies the mapping function of the specific typeTto aStringso an element can be shown to a user as suggestions.- Parameters:
mapper- the mapping function that creates aString- Returns:
- this list argument builder
-
withStringTooltipMapper
public ListArgumentBuilder<T>.ListArgumentBuilderSuggests.ListArgumentBuilderFinished withStringTooltipMapper(Function<T, IStringTooltip> mapper) Specifies the mapping function of the specific typeTto aIStringTooltipso an element can be shown to a user as a suggestion with a tooltip.- Parameters:
mapper- the mapping function that creates anIStringTooltip- Returns:
- this list argument builder
-