refactor: Add logging to CommandManager and ModuleManager showing the amount of features registered

This commit is contained in:
xgraza
2026-01-26 08:29:42 -06:00
parent cea0301d52
commit 9834329f2b
2 changed files with 8 additions and 0 deletions
@@ -35,6 +35,8 @@ public class CommandManager extends Feature implements Jsonable {
registerExecutor(new HelpCommand());
registerExecutor(new PrefixCommand());
registerExecutor(new ToggleCommand());
LOGGER.info("Registered {} commands", commandList.size());
}
public void onChatSent(String message) {
@@ -24,11 +24,15 @@ import me.alpha432.oyvey.features.modules.player.Velocity;
import me.alpha432.oyvey.features.modules.render.BlockHighlight;
import me.alpha432.oyvey.util.traits.Jsonable;
import me.alpha432.oyvey.util.traits.Util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
import java.util.stream.Stream;
public class ModuleManager implements Jsonable, Util {
private static final Logger LOGGER = LoggerFactory.getLogger("ModuleManager");
private final Map<Class<? extends Module>, Module> fastRegistry = new HashMap<>();
private final List<Module> modules = new ArrayList<>();
@@ -48,6 +52,8 @@ public class ModuleManager implements Jsonable, Util {
register(new NoFall());
register(new KeyPearl());
LOGGER.info("Registered {} modules", modules.size());
// Create a command for each module for modules to be configurable via command line
for (Module module : modules) {
OyVey.commandManager.registerExecutor(new CommandModule(module));