refactor: Add logging to CommandManager and ModuleManager showing the amount of features registered
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user