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 --- .../cc/polyfrost/oneconfig/test/TestCommand.java | 39 ++++++++++++++++++++++ .../polyfrost/oneconfig/test/TestCommand_Test.java | 39 ---------------------- .../cc/polyfrost/oneconfig/test/TestConfig.java | 1 - .../oneconfig/test/TestNanoVGGui_Test.java | 4 +-- 4 files changed, 41 insertions(+), 42 deletions(-) create mode 100644 src/main/java/cc/polyfrost/oneconfig/test/TestCommand.java delete mode 100644 src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java (limited to 'src/main/java/cc/polyfrost/oneconfig/test') diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestCommand.java b/src/main/java/cc/polyfrost/oneconfig/test/TestCommand.java new file mode 100644 index 0000000..b757c73 --- /dev/null +++ b/src/main/java/cc/polyfrost/oneconfig/test/TestCommand.java @@ -0,0 +1,39 @@ +package cc.polyfrost.oneconfig.test; + +import cc.polyfrost.oneconfig.utils.commands.annotations.Command; +import cc.polyfrost.oneconfig.utils.commands.annotations.Main; +import cc.polyfrost.oneconfig.utils.commands.annotations.Name; +import cc.polyfrost.oneconfig.utils.commands.annotations.SubCommand; +import gg.essential.universal.UChat; + +@Command(value = "test", aliases = {"t"}) +public class TestCommand { + + @Main + private static void main() { // /test + UChat.chat("Main command"); + } + + @SubCommand(value = "subcommand", aliases = {"s"}) + private static class TestSubCommand { + + @Main(priority = 999) + private static void main(int a, float b, @Name("named c") String c) { // /test subcommand + UChat.chat("Integer main: " + a + " " + b + " " + c); + } + + @Main(priority = 10001) + private static void main(double a, double b, @Name("named c") String c) { // /test subcommand + UChat.chat("Double main: " + a + " " + b + " " + c); + } + + @SubCommand(value = "subsubcommand", aliases = {"ss"}) + private static class TestSubSubCommand { + + @Main + private static void main(String a, String b, @Name("named c") String c) { // /test subcommand subsubcommand + UChat.chat(a + " " + b + " " + c); + } + } + } +} diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java b/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java deleted file mode 100644 index d8c37f0..0000000 --- a/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java +++ /dev/null @@ -1,39 +0,0 @@ -package cc.polyfrost.oneconfig.test; - -import cc.polyfrost.oneconfig.libs.universal.UChat; -import cc.polyfrost.oneconfig.utils.commands.annotations.Command; -import cc.polyfrost.oneconfig.utils.commands.annotations.Main; -import cc.polyfrost.oneconfig.utils.commands.annotations.Name; -import cc.polyfrost.oneconfig.utils.commands.annotations.SubCommand; - -@Command(value = "test", aliases = {"t"}) -public class TestCommand_Test { - - @Main - private static void main() { // /test - UChat.chat("Main command"); - } - - @SubCommand(value = "subcommand", aliases = {"s"}) - private static class TestSubCommand { - - @Main(priority = 999) - private static void main(int a, float b, @Name("named c") String c) { // /test subcommand - UChat.chat("Integer main: " + a + " " + b + " " + c); - } - - @Main(priority = 10001) - private static void main(double a, double b, @Name("named c") String c) { // /test subcommand - UChat.chat("Double main: " + a + " " + b + " " + c); - } - - @SubCommand(value = "subsubcommand", aliases = {"ss"}) - private static class TestSubSubCommand { - - @Main - private static void main(String a, String b, @Name("named c") String c) { // /test subcommand subsubcommand - UChat.chat(a + " " + b + " " + c); - } - } - } -} diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestConfig.java b/src/main/java/cc/polyfrost/oneconfig/test/TestConfig.java index 6ce55f4..e67d491 100644 --- a/src/main/java/cc/polyfrost/oneconfig/test/TestConfig.java +++ b/src/main/java/cc/polyfrost/oneconfig/test/TestConfig.java @@ -7,7 +7,6 @@ import cc.polyfrost.oneconfig.config.core.OneKeyBind; import cc.polyfrost.oneconfig.config.data.*; import cc.polyfrost.oneconfig.config.interfaces.Config; import cc.polyfrost.oneconfig.config.migration.VigilanceMigrator; -import cc.polyfrost.oneconfig.lwjgl.image.SVGs; import net.minecraftforge.fml.common.FMLCommonHandler; public class TestConfig extends Config { diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java b/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java index f6ad3f5..504c12f 100644 --- a/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java +++ b/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java @@ -1,9 +1,9 @@ package cc.polyfrost.oneconfig.test; -import cc.polyfrost.oneconfig.libs.universal.UMatrixStack; -import cc.polyfrost.oneconfig.libs.universal.UScreen; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; +import gg.essential.universal.UMatrixStack; +import gg.essential.universal.UScreen; import org.jetbrains.annotations.NotNull; import java.awt.*; -- cgit