Interface BrigadierMappingBuilder<K extends ArgumentParser<?,?>,S>

Type Parameters:
K - the Cloud argument parser type
S - the brigadier-native sender type

public interface BrigadierMappingBuilder<K extends ArgumentParser<?,?>,S>
A builder for a mapping between a Cloud parser and a Brigadier ArgumentType
Since:
1.5.0
  • Method Details

    • toConstant

      @NonNull BrigadierMappingBuilder<K,S> toConstant(com.mojang.brigadier.arguments.ArgumentType<?> constant)
      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

      @NonNull BrigadierMappingBuilder<K,S> to(Function<K,? extends com.mojang.brigadier.arguments.ArgumentType<?>> mapper)
      Map the cloud argument parser to a variable Brigadier ArgumentType.
      Parameters:
      mapper - the mapper
      Returns:
      this builder
      Since:
      1.5.0
    • nativeSuggestions

      @NonNull 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

      @NonNull 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 @NonNull BrigadierMappingBuilder<K,S> suggestedByConstant(com.mojang.brigadier.suggestion.SuggestionProvider<S> provider)
      Use a custom Brigadier suggestion provider for this parser.
      Parameters:
      provider - the suggestion provider
      Returns:
      this builder
      Since:
      1.5.0
    • suggestedBy

      Use a custom Brigadier suggestion provider for this parser.
      Parameters:
      provider - the suggestion provider
      Returns:
      this builder
      Since:
      1.5.0
    • build

      Builds the mapping.
      Returns:
      the built mapping
      Since:
      2.0.0