From 44dfbbb419f1736530c04c02a651f7757cf83f3d Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sun, 5 Jun 2022 15:27:36 +0700 Subject: rewrite command manager, stop using essential relocate, and reformat code (#34) * reformat code * reformat code rewrite command manager stop using essential relocate --- src/main/java/cc/polyfrost/oneconfig/OneConfig.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/java/cc/polyfrost/oneconfig/OneConfig.java') diff --git a/src/main/java/cc/polyfrost/oneconfig/OneConfig.java b/src/main/java/cc/polyfrost/oneconfig/OneConfig.java index 977c53b..e8612b6 100644 --- a/src/main/java/cc/polyfrost/oneconfig/OneConfig.java +++ b/src/main/java/cc/polyfrost/oneconfig/OneConfig.java @@ -8,6 +8,7 @@ import cc.polyfrost.oneconfig.config.data.ModType; import cc.polyfrost.oneconfig.events.EventManager; import cc.polyfrost.oneconfig.hud.HudCore; import cc.polyfrost.oneconfig.lwjgl.BlurHandler; +import cc.polyfrost.oneconfig.test.TestCommand; import cc.polyfrost.oneconfig.test.TestConfig; import cc.polyfrost.oneconfig.utils.GuiUtils; import cc.polyfrost.oneconfig.utils.commands.CommandManager; @@ -28,10 +29,10 @@ import java.util.List; @net.minecraftforge.fml.common.Mod(modid = "@ID@", name = "@NAME@", version = "@VER@") public class OneConfig { public static final File oneConfigDir = new File("./OneConfig"); - public static OneConfigConfig config; - public static TestConfig testConfig; public static final List loadedMods = new ArrayList<>(); public static final List loadedOtherMods = new ArrayList<>(); + public static OneConfigConfig config; + public static TestConfig testConfig; private static boolean preLaunched = false; private static boolean initialized = false; @@ -60,7 +61,8 @@ public class OneConfig { GuiUtils.getDeltaTime(); // called to make sure static initializer is called BlurHandler.INSTANCE.load(); testConfig = new TestConfig(); - CommandManager.INSTANCE.registerCommand(new OneConfigCommand()); + CommandManager.INSTANCE.registerCommand(OneConfigCommand.class); + CommandManager.INSTANCE.registerCommand(TestCommand.class); EventManager.INSTANCE.register(new HudCore()); EventManager.INSTANCE.register(HypixelUtils.INSTANCE); reloadModsList(); -- cgit