diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-06-11 10:30:06 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-06-11 10:30:06 +0200 |
commit | 1ab7422957a76158883e0449ed593ac216c9ef80 (patch) | |
tree | eb3bb5434a1b860941f85d2fdb543264d094f2de /src/main/java/cc/polyfrost/oneconfig/test | |
parent | d888d6b7358226792bf0cedbe67c7bb26204983f (diff) | |
parent | f3aac4876936dc58e6251bffae4a203d7b964051 (diff) | |
download | OneConfig-1ab7422957a76158883e0449ed593ac216c9ef80.tar.gz OneConfig-1ab7422957a76158883e0449ed593ac216c9ef80.tar.bz2 OneConfig-1ab7422957a76158883e0449ed593ac216c9ef80.zip |
Merge branch 'master' of github.com:Polyfrost/OneConfig
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/test')
3 files changed, 33 insertions, 9 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java b/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java index 31a503b..33ed5b7 100644 --- a/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java +++ b/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java @@ -4,20 +4,20 @@ 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; +import cc.polyfrost.oneconfig.libs.universal.UChat; -@Command(value = "test", aliases = {"t"}) +@Command(value = "test", aliases = {"t"}, description = "Description of the test command") public class TestCommand_Test { - @Main + @Main(description = "The main command.") private static void main() { // /test UChat.chat("Main command"); } - @SubCommand(value = "subcommand", aliases = {"s"}) + @SubCommand(value = "subcommand", aliases = {"s"}, description = "Subcommand 1.") private static class TestSubCommand { - @Main(priority = 999) + @Main(priority = 999, description = "Description of method") private static void main(int a, float b, @Name("named c") String c) { // /test subcommand <a> <b> <c> UChat.chat("Integer main: " + a + " " + b + " " + c); } @@ -32,8 +32,32 @@ public class TestCommand_Test { @Main private static void main(String a, String b, @Name("named c") String c) { // /test subcommand subsubcommand <a> <b> <c> - UChat.chat(a + " " + b + " " + c); + joinAndChat(a, b, c); } } } + + @SubCommand(value = "subcommand2", aliases = {"s2"}) + private static class TestSubCommand2 { + @Main + private static void main(boolean a, boolean b, boolean c, boolean d, boolean e, boolean f, int hgshrs, boolean jrwjhrw) { + joinAndChat(a, b, c, d, e, f, hgshrs, jrwjhrw); + } + } + + @SubCommand(value = "subcommand3", aliases = {"s3"}) + private static class TestSubCommand3 { + @Main + private static void main() { + UChat.chat("subcommand 3"); + } + } + + private static void joinAndChat(Object... stuff) { + StringBuilder builder = new StringBuilder(); + for (Object thing : stuff) { + builder.append(thing).append(" "); + } + UChat.chat(builder.toString().trim()); + } } diff --git a/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java b/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java index 8279353..54b2728 100644 --- a/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java +++ b/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java @@ -7,7 +7,7 @@ import cc.polyfrost.oneconfig.config.data.*; import cc.polyfrost.oneconfig.config.Config; import cc.polyfrost.oneconfig.config.data.ModType; import cc.polyfrost.oneconfig.config.migration.VigilanceMigrator; -import gg.essential.universal.UKeyboard; +import cc.polyfrost.oneconfig.libs.universal.UKeyboard; import net.minecraftforge.fml.common.FMLCommonHandler; public class TestConfig_Test 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 5ad95c7..12a8735 100644 --- a/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java +++ b/src/main/java/cc/polyfrost/oneconfig/test/TestNanoVGGui_Test.java @@ -2,8 +2,8 @@ package cc.polyfrost.oneconfig.test; import cc.polyfrost.oneconfig.renderer.RenderManager; import cc.polyfrost.oneconfig.renderer.font.Fonts; -import gg.essential.universal.UMatrixStack; -import gg.essential.universal.UScreen; +import cc.polyfrost.oneconfig.libs.universal.UMatrixStack; +import cc.polyfrost.oneconfig.libs.universal.UScreen; import org.jetbrains.annotations.NotNull; import java.awt.*; |