Class BrigadierCommands

java.lang.Object
dev.despical.mazeengine.command.BrigadierCommands
All Implemented Interfaces:
AutoCloseable, org.bukkit.event.Listener

public final class BrigadierCommands extends Object implements org.bukkit.event.Listener, AutoCloseable
Builds the native command tree sent to Minecraft clients.

The tree describes subcommands, typed arguments, option redirects, and current maze, preset, and world suggestions. Execution delegates to the ACF command instance so the same annotated handlers and permission checks process typed commands and private chat callbacks.

The per-player command-tree listener hides callback-only branches and tokens from client suggestions without disabling their server execution. An identity set prevents revisiting redirected nodes. Closing the adapter unregisters its ACF commands as part of plugin shutdown.

  • Constructor Details

  • Method Details

    • visibleCommands

      public void visibleCommands(com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<?> event)
      Filter only the per-player client tree; the server still executes private chat callbacks normally.
    • tree

      public com.mojang.brigadier.builder.LiteralArgumentBuilder<io.papermc.paper.command.brigadier.CommandSourceStack> tree()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable