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 Type
    Method
    Description
    com.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 registered Command to brigadier node
    wrapCommandSource(Object commandSource)
    Converts the original command source from brigadier into the platform's command-source
  • Method Details

    • wrapCommandSource

      S wrapCommandSource(Object commandSource)
      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 ArgumentType for the Argument
    • parseCommandIntoNode

      <T> com.mojang.brigadier.tree.LiteralCommandNode<T> parseCommandIntoNode(studio.mevera.imperat.command.Command<S> command)
      Parses the registered Command to brigadier node
      Returns:
      the parsed node