Klasse CommandManager

java.lang.Object
de.delinkedde.mobarenareborn.command.CommandManager

public final class CommandManager extends Object
Builds and registers the /ma command tree.

Registration uses Paper's Brigadier integration through the LifecycleEvents.COMMANDS lifecycle event. The manager owns the ordered list of MobArenaCommand contributions and assembles them into a single root literal with aliases. Running /ma without arguments prints a short overview.

  • Konstruktordetails

    • CommandManager

      public CommandManager(@NotNull @NotNull MobArenaPlugin plugin, @NotNull @NotNull ConfigManager config, @NotNull @NotNull Messages messages, @NotNull @NotNull ArenaManager arenaManager, @NotNull @NotNull SessionManager sessionManager, @NotNull @NotNull ClassRegistry classRegistry, @NotNull @NotNull ProgressionService progression, @NotNull @NotNull MenuManager menus, @NotNull @NotNull RewardCache rewardCache, @NotNull @NotNull SpectateManager spectate, @NotNull @NotNull StatsService stats, @NotNull @NotNull ItemTemplates itemTemplates, @NotNull @NotNull StashStore stashStore)
      Creates the command manager and its subcommands.
      Parameter:
      plugin - the owning plugin, used for version metadata and logging
      config - the configuration manager, passed to commands that mutate configuration
      messages - the message renderer used for command output
      arenaManager - the arena registry backing the arena commands
      sessionManager - the session manager backing join, leave, ready and force operations
      classRegistry - the class registry backing the class command
      progression - the progression service backing the class command feedback
      menus - the menu manager backing the class selection GUI
      rewardCache - the reward cache backing the claim command
      spectate - the spectate manager backing the spectate command
      stats - the statistics service backing stats and top
  • Methodendetails

    • register

      public void register(@NotNull @NotNull LifecycleEventManager<Plugin> lifecycle)
      Registers the command tree with the server.

      Must be called during onEnable. The handler fires whenever the server builds its command registry, including on a Brigadier reload.

      Parameter:
      lifecycle - the plugin's lifecycle event manager, obtained from Plugin.getLifecycleManager()