DSL Usage
Example:
//you can use only 'name' param, others is optional
command(name="testDSL",
permission = "test",
tabComplete = listOf("subcmd1", "subcmd2")
) {
//You can add subcommand!
//args same with simpleCommand
subCommand("sub1", permission = "test") {
executor {
sender.sendMessage("sub")
val arg = argument(1) //args same with simpleCommand
}
//sub command in sub command!
subCommand("sub1sub") {
}
}
//if command hasnt args or first arg isnt subcommand
executor {
sender.sendMessage("usage")
}
}Last updated