Skip to content

Support Coroutines Flow in Menu DSL #22

@DevSrSouza

Description

@DevSrSouza

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!")
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions