public final class BrigadierParser<S,A extends revxrsal.commands.command.CommandActor>
extends java.lang.Object
| Constructor and Description |
|---|
BrigadierParser(@NotNull BrigadierConverter<A,S> converter) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull com.mojang.brigadier.Command<S> |
createAction(@NotNull revxrsal.commands.command.ExecutableCommand<A> command)
Returns a Brigadier
Command action that always delegates
the execution to the supplied Lamp instance. |
@NotNull com.mojang.brigadier.Command<S> |
createAction(@NotNull revxrsal.commands.Lamp<A> lamp)
Returns a Brigadier
Command action that always delegates
the execution to the supplied Lamp instance. |
@NotNull com.mojang.brigadier.tree.LiteralCommandNode<S> |
createNode(@NotNull revxrsal.commands.command.ExecutableCommand<A> command)
Creates a Brigadier
CommandNode based on the given ExecutableCommand |
@NotNull java.util.function.Predicate<S> |
createRequirement(@NotNull revxrsal.commands.command.CommandPermission<A> permission,
@NotNull revxrsal.commands.Lamp<A> lamp)
Creates a
Predicate that is equivalent to a CommandPermission |
@Nullable com.mojang.brigadier.suggestion.SuggestionProvider<S> |
createSuggestionProvider(@NotNull revxrsal.commands.node.ParameterNode<A,?> parameter)
Returns a Brigadier
SuggestionProvider action that always delegates
the auto-completion to the given ParameterNode. |
public BrigadierParser(@NotNull
@NotNull BrigadierConverter<A,S> converter)
@NotNull public @NotNull com.mojang.brigadier.tree.LiteralCommandNode<S> createNode(@NotNull @NotNull revxrsal.commands.command.ExecutableCommand<A> command)
CommandNode based on the given ExecutableCommandcommand - Command to wrap@NotNull public @NotNull java.util.function.Predicate<S> createRequirement(@NotNull @NotNull revxrsal.commands.command.CommandPermission<A> permission, @NotNull @NotNull revxrsal.commands.Lamp<A> lamp)
Predicate that is equivalent to a CommandPermissionpermission - Permission to wraplamp - The Lamp instance@NotNull public @NotNull com.mojang.brigadier.Command<S> createAction(@NotNull @NotNull revxrsal.commands.Lamp<A> lamp)
Command action that always delegates
the execution to the supplied Lamp instance.lamp - The Lamp instanceCommand@NotNull public @NotNull com.mojang.brigadier.Command<S> createAction(@NotNull @NotNull revxrsal.commands.command.ExecutableCommand<A> command)
Command action that always delegates
the execution to the supplied Lamp instance.command - The ExecutableCommand to runCommand@Nullable public @Nullable com.mojang.brigadier.suggestion.SuggestionProvider<S> createSuggestionProvider(@NotNull @NotNull revxrsal.commands.node.ParameterNode<A,?> parameter)
SuggestionProvider action that always delegates
the auto-completion to the given ParameterNode.
This may return null if the parameter node's provider equals
SuggestionProvider.empty(), as Brigadier
treats such parameters in a more nuanced way.
Command