Package studio.mevera.imperat
Interface BrigadierManager<S extends studio.mevera.imperat.context.CommandSource>
- Type Parameters:
S- the command-source valueType
- All Known Implementing Classes:
BaseBrigadierManager
public sealed interface BrigadierManager<S extends studio.mevera.imperat.context.CommandSource>
permits BaseBrigadierManager<S>
A class that manages parsing
Command
into brigadier CommandNode-
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.brigadier.arguments.ArgumentType<?>getArgumentType(studio.mevera.imperat.command.arguments.Argument<S> parameter) Fetches the argument valueType from the parameter<T> com.mojang.brigadier.tree.LiteralCommandNode<T>parseCommandIntoNode(studio.mevera.imperat.command.Command<S> command) Parses the registeredCommandto brigadier nodewrapCommandSource(Object commandSource) Converts the original command source from brigadier into the platform's command-source
-
Method Details
-
wrapCommandSource
Converts the original command source from brigadier into the platform's command-source- Parameters:
commandSource- the command source- Returns:
- the platform's command sender/source
-
getArgumentType
@NotNull com.mojang.brigadier.arguments.ArgumentType<?> getArgumentType(studio.mevera.imperat.command.arguments.Argument<S> parameter) Fetches the argument valueType from the parameter- Parameters:
parameter- the parameter- Returns:
- the
ArgumentTypefor theArgument
-
parseCommandIntoNode
<T> com.mojang.brigadier.tree.LiteralCommandNode<T> parseCommandIntoNode(studio.mevera.imperat.command.Command<S> command) Parses the registeredCommandto brigadier node- Returns:
- the parsed node
-