A Kotlin-first, Java-compatible event-handler library for the JVM.
| Module | Description | Java compatible |
|---|---|---|
kanal-core |
Core event bus - annotation and lambda subscribers, priority dispatch, cancellable and modifiable events, supertype dispatch, async handlers | Yes |
kanal-coroutines |
Coroutines extensions - asFlow, postSuspend, suspendHandler, nextEvent |
Kotlin only |
repositories {
maven("https://maven.meteordev.org/releases") {
name = "meteordev"
}
}
dependencies {
implementation("io.github.big-iron-cheems:kanal-core:$VERSION")
}Depends on kanal-core automatically via api().
dependencies {
implementation("io.github.big-iron-cheems:kanal-coroutines:$VERSION")
}Replace the placeholder $VERSION with the latest version shown in the badge above.
class PlayerJumpEvent(val player: String) : Event
val bus = EventBus()
bus.subscribe<PlayerJumpEvent> { e -> println("${e.player} jumped!") }
bus.post(PlayerJumpEvent("Steve"))See the module READMEs for the full API surface, Java usage, async dispatch, coroutines integration, and performance data.
The project specification is written in Typst under docs/.
To build the PDF locally, install Typst and run:
typst compile docs/kanal.typ docs/kanal.pdfApache 2.0, see LICENSE.