diff options
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java | 39 |
1 files changed, 39 insertions, 0 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 new file mode 100644 index 0000000..31a503b --- /dev/null +++ b/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.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_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 <a> <b> <c> + 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 <a> <b> <c> + 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 <a> <b> <c> + UChat.chat(a + " " + b + " " + c); + } + } + } +} |