Shynixn / MCCoroutine

MCCoroutine is a library, which adds extensive support for Kotlin Coroutines for Minecraft Server environments.
Other
211 stars 19 forks source link

Registering a suspend functional-style listener Velocity #107

Closed ChimpGamer closed 10 months ago

ChimpGamer commented 11 months ago

Would it be possible to add a suspend method for the registering functional-style listener? An example of the non suspend method: https://docs.papermc.io/velocity/dev/event-api#registering-a-functional-style-listener

Source code:

I hope I provided enough information for you to work with.

Shynixn commented 11 months ago

Sure, this can be added. However, I am on Christmas break right now.

Shynixn commented 10 months ago

Has been added to 2.14. See https://github.com/Shynixn/MCCoroutine/blob/master/mccoroutine-velocity-sample/src/main/java/com/github/shynixn/mccoroutine/velocity/MCCoroutineSamplePlugin.kt