aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/test/TestCommand_Test.java
blob: d8c37f01093c70be7233a0c9e64b94a0d2502410 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 <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);
            }
        }
    }
}