Interface Commodore


public interface Commodore
Utility for using Minecraft's 1.13 'brigadier' library in Bukkit plugins.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    register(com.mojang.brigadier.builder.LiteralArgumentBuilder<?> argumentBuilder)
    Registers the provided argument data to the dispatcher.
    void
    register(com.mojang.brigadier.tree.LiteralCommandNode<?> node)
    Registers the provided argument data to the dispatcher.
    default void
    register(org.bukkit.command.Command command, com.mojang.brigadier.builder.LiteralArgumentBuilder<?> argumentBuilder)
    Registers the provided argument data to the dispatcher, against all aliases defined for the command.
    default void
    register(org.bukkit.command.Command command, com.mojang.brigadier.builder.LiteralArgumentBuilder<?> argumentBuilder, Predicate<? super org.bukkit.entity.Player> permissionTest)
    Registers the provided argument data to the dispatcher, against all aliases defined for the command.
    default void
    register(org.bukkit.command.Command command, com.mojang.brigadier.tree.LiteralCommandNode<?> node)
    Registers the provided argument data to the dispatcher, against all aliases defined for the command.
    void
    register(org.bukkit.command.Command command, com.mojang.brigadier.tree.LiteralCommandNode<?> node, Predicate<? super org.bukkit.entity.Player> permissionTest)
    Registers the provided argument data to the dispatcher, against all aliases defined for the command.
  • Method Details

    • register

      void register(org.bukkit.command.Command command, com.mojang.brigadier.tree.LiteralCommandNode<?> node, Predicate<? super org.bukkit.entity.Player> permissionTest)
      Registers the provided argument data to the dispatcher, against all aliases defined for the command.

      Additionally applies the CraftBukkit SuggestionProvider to all arguments within the node, so ASK_SERVER suggestions can continue to function for the command.

      Players will only be sent argument data if they pass the provided permissionTest.

      Parameters:
      command - the command to read aliases from
      node - the argument data
      permissionTest - the predicate to check whether players should be sent argument data
    • register

      default void register(org.bukkit.command.Command command, com.mojang.brigadier.builder.LiteralArgumentBuilder<?> argumentBuilder, Predicate<? super org.bukkit.entity.Player> permissionTest)
      Registers the provided argument data to the dispatcher, against all aliases defined for the command.

      Additionally applies the CraftBukkit SuggestionProvider to all arguments within the node, so ASK_SERVER suggestions can continue to function for the command.

      Players will only be sent argument data if they pass the provided permissionTest.

      Parameters:
      command - the command to read aliases from
      argumentBuilder - the argument data, in a builder form
      permissionTest - the predicate to check whether players should be sent argument data
    • register

      default void register(org.bukkit.command.Command command, com.mojang.brigadier.tree.LiteralCommandNode<?> node)
      Registers the provided argument data to the dispatcher, against all aliases defined for the command.

      Additionally applies the CraftBukkit SuggestionProvider to all arguments within the node, so ASK_SERVER suggestions can continue to function for the command.

      Parameters:
      command - the command to read aliases from
      node - the argument data
    • register

      default void register(org.bukkit.command.Command command, com.mojang.brigadier.builder.LiteralArgumentBuilder<?> argumentBuilder)
      Registers the provided argument data to the dispatcher, against all aliases defined for the command.

      Additionally applies the CraftBukkit SuggestionProvider to all arguments within the node, so ASK_SERVER suggestions can continue to function for the command.

      Parameters:
      command - the command to read aliases from
      argumentBuilder - the argument data, in a builder form
    • register

      void register(com.mojang.brigadier.tree.LiteralCommandNode<?> node)
      Registers the provided argument data to the dispatcher.

      Equivalent to calling CommandDispatcher.register(LiteralArgumentBuilder).

      Prefer using register(Command, LiteralCommandNode).

      Parameters:
      node - the argument data
    • register

      default void register(com.mojang.brigadier.builder.LiteralArgumentBuilder<?> argumentBuilder)
      Registers the provided argument data to the dispatcher.

      Equivalent to calling CommandDispatcher.register(LiteralArgumentBuilder).

      Prefer using register(Command, LiteralArgumentBuilder).

      Parameters:
      argumentBuilder - the argument data