Interface LampBrigadier


public interface LampBrigadier
Represents a convenient way to hook into Brigadier and respect minor differences in different implementations
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull ClassMap<com.mojang.brigadier.arguments.ArgumentType<?>>
    Returns the special argument types for parameter types.
    default @Nullable com.mojang.brigadier.arguments.ArgumentType<?>
    getArgumentType(@NotNull CommandParameter parameter)
    Returns the ArgumentType corresponding to this parameter.
    default void
    register(@NotNull com.mojang.brigadier.builder.LiteralArgumentBuilder<?> node)
    Registers the given command node builder to the dispatcher
    void
    register(@NotNull com.mojang.brigadier.tree.LiteralCommandNode<?> node)
    Registers the given command node to the dispatcher.
    @NotNull CommandActor
    wrapSource(@NotNull Object commandSource)
    Wraps Brigadier's command sender with the platform's appropriate CommandActor
  • Method Details

    • wrapSource

      @NotNull @NotNull CommandActor wrapSource(@NotNull @NotNull Object commandSource)
      Wraps Brigadier's command sender with the platform's appropriate CommandActor
      Parameters:
      commandSource - Source to wrap
      Returns:
      The wrapped command source
    • register

      void register(@NotNull @NotNull com.mojang.brigadier.tree.LiteralCommandNode<?> node)
      Registers the given command node to the dispatcher.
      Parameters:
      node - Node to register
    • getArgumentType

      @Nullable default @Nullable com.mojang.brigadier.arguments.ArgumentType<?> getArgumentType(@NotNull @NotNull CommandParameter parameter)
      Returns the ArgumentType corresponding to this parameter. This may be used to return certain argument types that cannot be registered in getAdditionalArgumentTypes() (for example, generic types).
      Parameters:
      parameter - Parameter to get for
      Returns:
      The argument type, or null if not applicable.
    • getAdditionalArgumentTypes

      @NotNull @NotNull ClassMap<com.mojang.brigadier.arguments.ArgumentType<?>> getAdditionalArgumentTypes()
      Returns the special argument types for parameter types.
      Returns:
      Additional argument types
    • register

      default void register(@NotNull @NotNull com.mojang.brigadier.builder.LiteralArgumentBuilder<?> node)
      Registers the given command node builder to the dispatcher
      Parameters:
      node - Node to register