Interface BrigadierCommand


public interface BrigadierCommand
A command whose Brigadier tree the module builds by hand. The framework registers it, owns it with the module and hides it when the module unloads; validators, cooldowns and @CmdParam suggestions do not apply.

Register an implementation as a container bean, for example with the framework's @Service annotation. Aliases of the same bean are registered once. A redirect into this tree targets its owned proxy; a redirect outside this tree retains its original target, which is not governed by this module's unload. Use lower-case root labels.

Since:
7.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Supplies additional labels.
    default @Nullable String
    Supplies the text shown in help.
    com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack>
    Supplies the root node, whose literal is the command label.
  • Method Details

    • node

      com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node()
      Supplies the root node, whose literal is the command label. Called once per registration.
      Returns:
      the complete root tree
    • aliases

      default Collection<String> aliases()
      Supplies additional labels.
      Returns:
      the aliases, empty by default
    • description

      @Nullable default @Nullable String description()
      Supplies the text shown in help.
      Returns:
      the description, or null for none