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

An intermediary class for the MapArgumentBuilder. More...

Classes

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

Public Member Functions

 MapArgumentBuilderSuggestsKey (StringParser< V > valueMapper)
 
MapArgumentBuilderSuggestsValue withKeyList (List< String > keyList)
 Provides a list of keys to suggest when a user types this argument. More...
 
MapArgumentBuilderSuggestsValue withoutKeyList ()
 When using this method, no key suggestions are displayed and any keys can be given for the final map. More...
 

Detailed Description

An intermediary class for the MapArgumentBuilder.

Member Function Documentation

◆ withKeyList()

MapArgumentBuilderSuggestsValue dev.jorel.commandapi.arguments.MapArgumentBuilder< K, V >.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.withKeyList ( List< String >  keyList)

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

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

Duplicate keys are never allowed since one key can only be mapped to one value. If a duplicate key is given, a CommandSyntaxException is thrown.

Parameters
keyListA list of keys to suggest.
Returns
this map argument builder

◆ withoutKeyList()

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

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

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

Duplicate keys are never allowed since one key can only be mapped to one value. If a duplicate key is given, a CommandSyntaxException is thrown.

Returns
this map argument builder