Class MagicUtilsBundleCommand
java.lang.Object
dev.ua.theroer.magicutils.commands.MagicCommand
dev.ua.theroer.magicutils.diagnostics.MagicUtilsBundleCommand
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class MagicCommand
MagicCommand.Builder<S>, MagicCommand.SubCommandInfo -
Constructor Summary
ConstructorsConstructorDescriptionMagicUtilsBundleCommand(@Nullable LoggerCore logger, @Nullable String bundleVersion, @Nullable Supplier<List<MagicUtilsConsumerInfo>> consumersSupplier, @Nullable Function<String, MagicUtilsConsumerInfo> consumerLookup, @Nullable Supplier<DiagnosticsService> diagnosticsServiceSupplier, @Nullable Supplier<CommandManager<?>> commandManagerSupplier) Creates the shared bundle command. -
Method Summary
Modifier and TypeMethodDescriptionexecute(MagicSender sender) mod(MagicSender sender, String modName) mods(MagicSender sender) Methods inherited from class MagicCommand
addAlias, addSubCommand, addSubCommand, builder, copy, findExecuteMethod, fromSpec, getArguments, getCommandInfo, getSubCommands, getUsage, isFrozen, mergeSubCommands, mount, mount, mountSubCommands, overrideInfo, removeAlias, resolveInfo, setExecute, setExecute, setExecute, setExecute, setExecute, setExecute, withInfo, withName
-
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 stringconsumersSupplier- source of shared-runtime consumers (may return empty)consumerLookup- lookup of one consumer by name (may return null)diagnosticsServiceSupplier- diagnostics service source, enables thediagnosticssub-commands when non-nullcommandManagerSupplier- command manager source, enableshelpwhen non-null
-
-
Method Details
-
execute
-
mods
-
mod
-