Shynixn / MCCoroutine

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

Support coroutine context for Velocity Brigadier command system #94

Closed Distractic closed 1 year ago

Distractic commented 1 year ago

Context

Currently, for Velocity, the class SuspendingSimpleCommand is present. However, lot of server use Brigadier command system. So, could you add some extensions to use brigadier command in a coroutine context ?

The documentation about brigadier + Example Other example of brigadier

Shynixn commented 1 year ago

I think the velocity module has got a binding for the brigadier command builder. It is attached to the ArgumentBuilder

https://github.com/Shynixn/MCCoroutine/blob/5453248116100463dc20aa9b2e45f66d5d398e38/mccoroutine-velocity-api/src/main/java/com/github/shynixn/mccoroutine/velocity/MCCoroutine.kt#L103

Distractic commented 1 year ago

Ah yes ! My bad, I didn't see the method executesSuspend