A Kotlin-based annotation command system for the Sponge platform.
Commands shouldn't be verbose to set up, and this library simplifies the work into simply declaring functions.
@Command("resident", "res")
object CommandResident {
@Command("friend")
object SubFriend {
@Command("add")
fun add(@Source src: CommandSource, @Source srcResident: Resident, resident: Resident) {
transaction(DB) {
srcResident.friends = SizedCollection(srcResident.friends + resident)
src.sendMessage("Added a friend: ".green() + resident.name.white())
}
}
}
}
repositories {
maven {
setUrl("https://jitpack.io")
}
}
dependencies {
implementation("com.github.TheFrontier:SKC:<current version>")
}