Class MagicUtilsBundleCommand

java.lang.Object
dev.ua.theroer.magicutils.commands.MagicCommand
dev.ua.theroer.magicutils.diagnostics.MagicUtilsBundleCommand

public final class MagicUtilsBundleCommand extends MagicCommand
Loader-agnostic /magicutils bundle command shared by every platform bundle (Bukkit, Fabric, NeoForge, …). It renders the bundle status, lists the shared-runtime consumers, and wires the diagnostics + help sub-commands.

Everything platform-specific is injected as plain functions: the bundle version, where to read the connected consumers from, and how to look one up by name. Platforms with no shared-runtime consumer registry (e.g. NeoForge) just pass empty suppliers and still get the status/diagnostics/help surface. This replaces the three near-identical per-loader command classes.

  • Constructor Details

    • MagicUtilsBundleCommand

      public MagicUtilsBundleCommand(@Nullable @Nullable LoggerCore logger, @Nullable @Nullable String bundleVersion, @Nullable @Nullable Supplier<List<MagicUtilsConsumerInfo>> consumersSupplier, @Nullable @Nullable Function<String, MagicUtilsConsumerInfo> consumerLookup, @Nullable @Nullable Supplier<DiagnosticsService> diagnosticsServiceSupplier, @Nullable @Nullable Supplier<CommandManager<?>> commandManagerSupplier)
      Creates the shared bundle command.
      Parameters:
      logger - logger core used to render chat output (nullable)
      bundleVersion - the bundle's own version string
      consumersSupplier - source of shared-runtime consumers (may return empty)
      consumerLookup - lookup of one consumer by name (may return null)
      diagnosticsServiceSupplier - diagnostics service source, enables the diagnostics sub-commands when non-null
      commandManagerSupplier - command manager source, enables help when non-null
  • Method Details