Class CloudDelegatingSuggestionProvider<C,S>

java.lang.Object
org.incendo.cloud.brigadier.suggestion.CloudDelegatingSuggestionProvider<C,S>
Type Parameters:
C - the Cloud command sender type
S - the Brigadier command sender type
All Implemented Interfaces:
com.mojang.brigadier.suggestion.SuggestionProvider<S>

@API(status=INTERNAL, since="2.0.0") public final class CloudDelegatingSuggestionProvider<C,S> extends Object implements com.mojang.brigadier.suggestion.SuggestionProvider<S>
Brigadier suggestion provider that delegates to Cloud's suggestion provider.
Since:
2.0.0
  • Constructor Details

    • CloudDelegatingSuggestionProvider

      public CloudDelegatingSuggestionProvider(@NonNull BrigadierSuggestionFactory<C,S> suggestionFactory, @NonNull org.incendo.cloud.internal.CommandNode<C> node)
      Creates a new suggestion provider.
      Parameters:
      suggestionFactory - the factory that produces suggestions
      node - the node to generate suggestions for
  • Method Details

    • getSuggestions

      public @NonNull CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> getSuggestions(@NonNull com.mojang.brigadier.context.CommandContext<S> context, @NonNull com.mojang.brigadier.suggestion.SuggestionsBuilder builder) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getSuggestions in interface com.mojang.brigadier.suggestion.SuggestionProvider<C>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException