Closed Matt-MX closed 4 months ago
Might not be an issue since we can just treat these "subcommands" as multi-args e.g
val choices by multiChoiceArgument<(Double, Double) -> Double>(
"add" to { a, b -> a + b },
"sub" to { a, b -> a - b },
"mul" to { a, b -> a * b },
"div" to { a, b -> a / b },
)
("math" / a / choices / b) {
runs<Player> {
reply(!"&a${choices(a(), b())}")
}
}
Currently declarative command builder doesn't allow for defining a subcommand/enum choice after an argument.
This syntax is not final and is just an example.