Package cloud.commandframework.brigadier
Interface BrigadierMappingBuilder<K extends cloud.commandframework.arguments.parser.ArgumentParser<?,?>,S>
- Type Parameters:
K- the Cloud argument parser typeS- the brigadier-native sender type
public interface BrigadierMappingBuilder<K extends cloud.commandframework.arguments.parser.ArgumentParser<?,?>,S>
A builder for a mapping between a Cloud parser and a Brigadier
ArgumentType- Since:
- 1.5.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBrigadierMappingBuilder.SuggestionProviderSupplier<K extends cloud.commandframework.arguments.parser.ArgumentParser<?,?>, S> -
Method Summary
Modifier and TypeMethodDescriptionUse the suggestions from Cloud's parser for this argument type.Use the default brigadier suggestions for this argument type.Use a custom Brigadier suggestion provider for this parser.default BrigadierMappingBuilder<K,S> suggestedByConstant(com.mojang.brigadier.suggestion.SuggestionProvider<S> provider) Use a custom Brigadier suggestion provider for this parser.Map the cloud argument parser to a variable BrigadierArgumentType.toConstant(com.mojang.brigadier.arguments.ArgumentType<?> constant) Map the argument type parser to a constant Brigadier argument type instance.
-
Method Details
-
toConstant
Map the argument type parser to a constant Brigadier argument type instance.- Parameters:
constant- the argument type- Returns:
- this builder
- Since:
- 1.5.0
-
to
BrigadierMappingBuilder<K,S> to(Function<K, ? extends com.mojang.brigadier.arguments.ArgumentType<?>> mapper) Map the cloud argument parser to a variable BrigadierArgumentType.- Parameters:
mapper- the mapper- Returns:
- this builder
- Since:
- 1.5.0
-
nativeSuggestions
BrigadierMappingBuilder<K,S> nativeSuggestions()Use the default brigadier suggestions for this argument type.This is the default option if a mapped type is specified.
- Returns:
- this builder
- Since:
- 1.5.0
-
cloudSuggestions
BrigadierMappingBuilder<K,S> cloudSuggestions()Use the suggestions from Cloud's parser for this argument type.This is not the default suggestions configuration.
Any previously set suggestion provider suppliers will not be used.
- Returns:
- this builder
- Since:
- 1.5.0
-
suggestedByConstant
default BrigadierMappingBuilder<K,S> suggestedByConstant(com.mojang.brigadier.suggestion.SuggestionProvider<S> provider) Use a custom Brigadier suggestion provider for this parser.- Parameters:
provider- the suggestions provider- Returns:
- this builder
- Since:
- 1.5.0
-
suggestedBy
BrigadierMappingBuilder<K,S> suggestedBy(BrigadierMappingBuilder.SuggestionProviderSupplier<K, S> provider) Use a custom Brigadier suggestion provider for this parser.- Parameters:
provider- the suggestions provider- Returns:
- this builder
- Since:
- 1.5.0
-