Description
Commands with subcommands lose all of their subcommand information once the command is registered. This should be made accessible for runtime use.
Expected code
If you have this code:
CommandAPICommand main = null;
main = new CommandAPICommand("main")
.executes((sender, args) -> {
System.out.println(main.getSubcommands().size());
});
CommandAPICommand sub = new CommandAPICommand("sub")
.executes((sender, args) -> {
System.out.println("Subcommand called");
});
main.withSubcommand(sub);
main.register();
Then running /main should print 1.
Extra details
No response
Description
Commands with subcommands lose all of their subcommand information once the command is registered. This should be made accessible for runtime use.
Expected code
If you have this code:
Then running
/mainshould print 1.Extra details
No response