Aegis is a DSL/Wrapper around brigadier for kotlin, designed to reduce clutter
Standard kotlin brigadier (with static imports):
dispatcher.register(
literal("example")
.then(
argument(
"value", IntegerArgumentType.integer(-10, 200)
).executes {
println(IntegerArgumentType.getInteger(it, "value"))
1
}
)
)
Aegis (No imports except for AegisCommandBuilder):
dispatcher.register(
AegisCommandBuilder("example") {
integer("value", -10, 200) {
executes {
println(IntegerArgumentType.getInteger(it, "value"))
1
}
}
}.build()
)
repositories {
maven {
url 'https://jitpack.io'
}
}
dependencies {
// Aegis
implementation 'com.github.P03W:Aegis:<VERSION>'
include 'com.github.P03W:Aegis:<VERSION>'
}
Aegis does not cover every use case (at least, not currently!), however most cases not covered explicitly are covered by the raw and custom blocks
If you find a use case not covered explicitly that can not be achieved with these blocks, please open an issue!