CommandAPI 9.6.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.arguments.MapArgumentBuilder< K, V >.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue Class Reference

An intermediary class for the MapArgumentBuilder. More...

Classes

class  MapArgumentBuilderFinished
 An intermediary class for the MapArgumentBuilder. More...
 

Public Member Functions

 MapArgumentBuilderSuggestsValue (List< String > keyList)
 
MapArgumentBuilderFinished withValueList (List< String > valueList)
 Provides a list of values to suggest when a user types this argument. More...
 
MapArgumentBuilderFinished withValueList (List< String > valueList, boolean allowDuplicates)
 Provides a list of values to suggest when a user types this argument. More...
 
MapArgumentBuilderFinished withoutValueList ()
 When using this method, no value suggestions are displayed and any values can be given for the final map. More...
 
MapArgumentBuilderFinished withoutValueList (boolean allowDuplicates)
 When using this method, no value suggestions are displayed and any values can be given for the final map. More...
 

Detailed Description

An intermediary class for the MapArgumentBuilder.

Member Function Documentation

◆ withoutValueList() [1/2]

MapArgumentBuilderFinished dev.jorel.commandapi.arguments.MapArgumentBuilder< K, V >.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.withoutValueList ( )

When using this method, no value suggestions are displayed and any values can be given for the final map.

To restrict the values that can be given for this map, use withValueList(List) instead.

Additionally, duplicate values are not allowed. If a duplicate value is given, a CommandSyntaxException is thrown. To allow duplicate values, use the withoutValueList(boolean) method instead.

Returns
this map argument builder

◆ withoutValueList() [2/2]

MapArgumentBuilderFinished dev.jorel.commandapi.arguments.MapArgumentBuilder< K, V >.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.withoutValueList ( boolean  allowDuplicates)

When using this method, no value suggestions are displayed and any values can be given for the final map.

To restrict the values that can be given for this map, use withValueList(List, boolean) instead.

If allowDuplicates is true, then multiple keys may be given the same value. Otherwise, if a duplicate value is given, a CommandSyntaxException is thrown.

Parameters
allowDuplicatesDecides if a value can be written more than once
Returns
this map argument builder

◆ withValueList() [1/2]

MapArgumentBuilderFinished dev.jorel.commandapi.arguments.MapArgumentBuilder< K, V >.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.withValueList ( List< String >  valueList)

Provides a list of values to suggest when a user types this argument.

All values given for the final map must come from this list, otherwise a CommandSyntaxException is thrown.

Additionally, duplicate values are not allowed. If a duplicate value is given, a CommandSyntaxException is thrown. To allow duplicate values, use the withValueList(List, boolean) method instead.

Parameters
valueListA list of values to suggest. The values need to be Strings, so they can be suggested
Returns
this map argument builder

◆ withValueList() [2/2]

MapArgumentBuilderFinished dev.jorel.commandapi.arguments.MapArgumentBuilder< K, V >.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.withValueList ( List< String >  valueList,
boolean  allowDuplicates 
)

Provides a list of values to suggest when a user types this argument.

All values given for the final map must come from this list, otherwise a CommandSyntaxException is thrown.

If allowDuplicates is true, then multiple keys may be given the same value. Otherwise, if a duplicate value is given, a CommandSyntaxException is thrown.

Parameters
valueListA list of values to suggest. The values need to be Strings, so they can be suggested
allowDuplicatesDecides if a value can be written more than once
Returns
this map argument builder