KotlinBukkitAPI
KotlinBukkitAPI copied to clipboard
Support Coroutines Flow in Menu DSL
The Menu DSL should support Coroutines Flow.
For slots could be something like this:
val stateFlow: StateFlow<ItemStack>
slot(1, 5, null) {
onRender {
showingItem = stateFlow.value
}
onFlowChange(stateFlow) { value ->
showingItem = value
player.msg("Hi!")
}
}