Skip to content

rx-dev/Aegis

 
 

Repository files navigation

Aegis

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()
)

Installation (build.gradle)

Latest version:

repositories {
    maven {
        url 'https://jitpack.io'
    }
}
dependencies {
    // Aegis
    implementation 'com.github.P03W:Aegis:<VERSION>'
    include 'com.github.P03W:Aegis:<VERSION>'
}

Implementation notes

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!

About

Aegis is a DSL/Wrapper around brigadier for kotlin

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Kotlin 100.0%