CommandAPI 9.4.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.arguments.ListArgumentBuilder< T >.ListArgumentBuilderSuggests Class Reference

An intermediary class for the ListArgumentBuilder. More...

Classes

class  ListArgumentBuilderFinished
 An intermediary class for the ListArgumentBuilder. More...
 

Public Member Functions

ListArgumentBuilderFinished withStringMapper ()
 Specifies that the mapping function for this argument calls the toString() method. More...
 
ListArgumentBuilderFinished withMapper (Function< T, String > mapper)
 Specifies the mapping function of the specific type T to a String so an element can be shown to a user as suggestions. More...
 
ListArgumentBuilderFinished withStringTooltipMapper (Function< T, IStringTooltip > mapper)
 Specifies the mapping function of the specific type T to a IStringTooltip so an element can be shown to a user as a suggestion with a tooltip. More...
 

Detailed Description

An intermediary class for the ListArgumentBuilder.

Member Function Documentation

◆ withMapper()

ListArgumentBuilderFinished dev.jorel.commandapi.arguments.ListArgumentBuilder< T >.ListArgumentBuilderSuggests.withMapper ( Function< T, String >  mapper)

Specifies the mapping function of the specific type T to a String so an element can be shown to a user as suggestions.

Parameters
mapperthe mapping function that creates a String
Returns
this list argument builder

◆ withStringMapper()

ListArgumentBuilderFinished dev.jorel.commandapi.arguments.ListArgumentBuilder< T >.ListArgumentBuilderSuggests.withStringMapper ( )

Specifies that the mapping function for this argument calls the toString() method.

Returns
this list argument builder

◆ withStringTooltipMapper()

ListArgumentBuilderFinished dev.jorel.commandapi.arguments.ListArgumentBuilder< T >.ListArgumentBuilderSuggests.withStringTooltipMapper ( Function< T, IStringTooltip mapper)

Specifies the mapping function of the specific type T to a IStringTooltip so an element can be shown to a user as a suggestion with a tooltip.

Parameters
mapperthe mapping function that creates an IStringTooltip
Returns
this list argument builder