Class MapArgumentBuilder.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue
MapArgumentBuilder-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished When using this method, no value suggestions are displayed and any values can be given for the final map.MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished withoutValueList(boolean allowDuplicates) When using this method, no value suggestions are displayed and any values can be given for the final map.MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished withValueList(Supplier<List<String>> valueListSupplier) Provides a supplier of values to suggest when a user types this argument.MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished withValueList(Supplier<List<String>> valueListSupplier, boolean allowDuplicates) Provides a supplier of values to suggest when a user types this argument.MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished withValueList(List<String> valueList) Provides a list of values to suggest when a user types this argument.MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished withValueList(List<String> valueList, boolean allowDuplicates) Provides a list of values to suggest when a user types this argument.
-
Constructor Details
-
MapArgumentBuilderSuggestsValue
-
-
Method Details
-
withValueList
public MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished 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:
valueList- A list of values to suggest. The values need to be Strings, so they can be suggested- Returns:
- this map argument builder
-
withValueList
public MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished 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:
valueList- A list of values to suggest. The values need to be Strings, so they can be suggestedallowDuplicates- Decides if a value can be written more than once- Returns:
- this map argument builder
-
withValueList
public MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished withValueList(Supplier<List<String>> valueListSupplier) Provides a supplier of values to suggest when a user types this argument. The supplier is invoked on every tab-completion, so changes to the underlying data are always reflected. 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(Supplier, boolean)method instead.- Parameters:
valueListSupplier- A supplier that provides the list of values to suggest.- Returns:
- this map argument builder
-
withValueList
public MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished withValueList(Supplier<List<String>> valueListSupplier, boolean allowDuplicates) Provides a supplier of values to suggest when a user types this argument. The supplier is invoked on every tab-completion, so changes to the underlying data are always reflected. 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:
valueListSupplier- A supplier that provides the list of values to suggest.allowDuplicates- Decides if a value can be written more than once- Returns:
- this map argument builder
-
withoutValueList
public MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished 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, usewithValueList(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
public MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper.MapArgumentBuilderSuggestsKey.MapArgumentBuilderSuggestsValue.MapArgumentBuilderFinished 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, usewithValueList(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:
allowDuplicates- Decides if a value can be written more than once- Returns:
- this map argument builder
-