Closed Matt-MX closed 6 months ago
Implementing a new DSL for command building could be useful.
"/test <player:player> <msg:string...>" { val player by argument<Player>() val msg by argument<Array<String>>() player.sendMessage(!"&7[${source.name} -> Me]" + Component.text(msg)) source.sendMessage(!"&7[Me -> ${player.name}]" + Component.text(msg)) } "/foo" { "bar" { source.sendMessage("Bar") } "fizz <msg:string...>" { val msg by argument<Array<String>>() source.sendMessage("Fizz ($msg)") } missing { source.sendMessage("Argument $argName is required") } }
impl in #21
Implementing a new DSL for command building could be useful.