public final class BrigadierAdapter
extends java.lang.Object
Lamp instance
into brigadier CommandNodes| Constructor and Description |
|---|
BrigadierAdapter() |
| Modifier and Type | Method and Description |
|---|---|
static <S,A extends revxrsal.commands.command.CommandActor> |
createSuggestionProvider(revxrsal.commands.node.ParameterNode<A,?> parameter,
BrigadierConverter<A,S> converter)
Returns a Brigadier
SuggestionProvider action that always delegates
the auto-completion to the given ParameterNode. |
static <A extends revxrsal.commands.command.CommandActor> |
provideAsyncCompletions(@NotNull revxrsal.commands.autocomplete.AsyncSuggestionProvider<A> suggestions,
@NotNull com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
@NotNull revxrsal.commands.node.ExecutionContext<A> context,
@Nullable com.mojang.brigadier.Message tooltip) |
static <A extends revxrsal.commands.command.CommandActor,T> |
toParameterType(@NotNull com.mojang.brigadier.arguments.ArgumentType<T> argumentType)
Wraps the given
ArgumentType into a ParameterType. |
@Nullable
public static <S,A extends revxrsal.commands.command.CommandActor> @Nullable com.mojang.brigadier.suggestion.SuggestionProvider<S> createSuggestionProvider(revxrsal.commands.node.ParameterNode<A,?> parameter,
BrigadierConverter<A,S> converter)
SuggestionProvider action that always delegates
the auto-completion to the given ParameterNode.
If the specified parameter has a ParameterType generated from
toParameterType(ArgumentType), the wrapped ArgumentType will
provide suggestions unless explicitly overridden.
This may return null if the parameter node's provider equals
SuggestionProvider.empty(), as Brigadier
treats such parameters in a more nuanced way.
S - The Brigadier sender typeA - The Lamp actor typeconverter - The BrigadierConverterCommand@NotNull
public static <A extends revxrsal.commands.command.CommandActor> @NotNull java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> provideAsyncCompletions(@NotNull
@NotNull revxrsal.commands.autocomplete.AsyncSuggestionProvider<A> suggestions,
@NotNull
@NotNull com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
@NotNull
@NotNull revxrsal.commands.node.ExecutionContext<A> context,
@Nullable
@Nullable com.mojang.brigadier.Message tooltip)
@NotNull
public static <A extends revxrsal.commands.command.CommandActor,T> @NotNull revxrsal.commands.parameter.ParameterType<A,T> toParameterType(@NotNull
@NotNull com.mojang.brigadier.arguments.ArgumentType<T> argumentType)
ArgumentType into a ParameterType.
Note that this will not give the same suggestions as the given type.
A - The actor typeT - The parameter typeargumentType - Argument type to wrap