Shynixn / MCCoroutine

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

Support of Minestom #91

Closed Distractic closed 1 year ago

Distractic commented 1 year ago

Can you add support for Minestom game server ?

Shynixn commented 1 year ago

Yes, I can do that.

After reading the wiki/javadocs of Minestom, it makes sense to implement MCCoroutine as a library for the following things

However, I am not sure how to implement plugin.launch {} as there is no "plugin instance" in Minestom. Do you have an idea where to add the coroutine launch function?

Tofaa2 commented 1 year ago

Yes, I can do that.

After reading the wiki/javadocs of Minestom, it makes sense to implement MCCoroutine as a library for the following things

  • Acquirable API
  • Listeners
  • Commands

However, I am not sure how to implement plugin.launch {} as there is no "plugin instance" in Minestom. Do you have an idea where to add the coroutine launch function?

Saw your post on the Minestom discord server, I'm not sure exactly what you're referring to as plugin.launch {} but if you mean generic Java Plugins then Minestom has an extension system that contains initialize() and terminate()

Shynixn commented 1 year ago

Thanks. MCCoroutine is designed to offer a custom coroutine scope for minecraft server frameworks which have a concept of "plugins". Minestom seems to have Extension but this may not be used if you directly modify the Minestom server software.

I'll think about it and click through the Minestom source code.

Shynixn commented 1 year ago

Minestom support has been implemented.