Klasse CommandManager
java.lang.Object
de.delinkedde.mobarenareborn.command.CommandManager
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.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCommandManager(@NotNull MobArenaPlugin plugin, @NotNull ConfigManager config, @NotNull Messages messages, @NotNull ArenaManager arenaManager, @NotNull SessionManager sessionManager, @NotNull ClassRegistry classRegistry, @NotNull ProgressionService progression, @NotNull MenuManager menus, @NotNull RewardCache rewardCache, @NotNull SpectateManager spectate, @NotNull StatsService stats, @NotNull ItemTemplates itemTemplates, @NotNull StashStore stashStore) Creates the command manager and its subcommands. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidregister(@NotNull LifecycleEventManager<Plugin> lifecycle) Registers the command tree with the server.
-
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 loggingconfig- the configuration manager, passed to commands that mutate configurationmessages- the message renderer used for command outputarenaManager- the arena registry backing the arena commandssessionManager- the session manager backing join, leave, ready and force operationsclassRegistry- the class registry backing the class commandprogression- the progression service backing the class command feedbackmenus- the menu manager backing the class selection GUIrewardCache- the reward cache backing theclaimcommandspectate- the spectate manager backing thespectatecommandstats- the statistics service backingstatsandtop
-
-
Methodendetails
-
register
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 fromPlugin.getLifecycleManager()
-