Interface BukkitBrigadier

All Known Implementing Classes:
CommodoreBukkitBrigadier

public interface BukkitBrigadier
Represents the brigadier hook for Bukkit
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bind(@NotNull Class<?> type, @NotNull com.mojang.brigadier.arguments.ArgumentType<?> argumentType)
    Registers an argument type for the given class.
    void
    bind(@NotNull Class<?> type, @NotNull ArgumentTypeResolver resolver)
    Registers an argument type resolver for the given class.
    void
    bind(@NotNull Class<?> type, @NotNull MinecraftArgumentType argumentType)
    Registers an argument type for the given class.
    @NotNull com.mojang.brigadier.arguments.ArgumentType<?>
    getArgumentType(@NotNull CommandParameter parameter)
    Returns the argument type corresponding to the given parameter.
    void
    Registers the command handler's brigadier
    @NotNull CommandActor
    wrapSource(@NotNull Object commandSource)
    Wraps Brigadier's command sender with the platform's appropriate CommandActor
  • Method Details

    • bind

      void bind(@NotNull @NotNull Class<?> type, @NotNull @NotNull ArgumentTypeResolver resolver)
      Registers an argument type resolver for the given class. This will include subclasses as well.
      Parameters:
      type - Type to register for
      resolver - The argument type resolver
    • bind

      void bind(@NotNull @NotNull Class<?> type, @NotNull @NotNull com.mojang.brigadier.arguments.ArgumentType<?> argumentType)
      Registers an argument type for the given class. This will include subclasses as well.
      Parameters:
      type - Type to register for
      argumentType - The argument type to register
      See Also:
    • bind

      void bind(@NotNull @NotNull Class<?> type, @NotNull @NotNull MinecraftArgumentType argumentType)
      Registers an argument type for the given class. This will include subclasses as well.
      Parameters:
      type - Type to register for
      argumentType - The argument type to register
      See Also:
    • getArgumentType

      @NotNull @NotNull com.mojang.brigadier.arguments.ArgumentType<?> getArgumentType(@NotNull @NotNull CommandParameter parameter)
      Returns the argument type corresponding to the given parameter. If no resolver is able to handle this parameter, StringArgumentType.greedyString() will be returned.
      Parameters:
      parameter - Parameter to got for
      Returns:
      The argument type
    • 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()
      Registers the command handler's brigadier