MCCoroutine is a library, which adds extensive support for Kotlin Coroutines for Minecraft Server environments.
delay(1.ticks)
. See the wiki for details.This change is a major version change and contains breaking changes. Please follow the upgrade guide below.
MCCoroutineExceptionEvent
. The details are explained on the new wiki page.MCCoroutineExceptionEvent
.mccoroutine-framework-api
projects.plugin.launchAsync
from MCCoroutine. This function was an idea to directly allow async dispatches. However, after investigating open source projects, this function was almost always used incorrectly and caused to return on unknown threads. Please see the upgrade guide below, how to fix it.plugin.launch
behaves now exactly the same as plugin.scope.launch
.start
parameter to plugin.launch
plugin.launchAsync
// 1.x.x
fun foo(){
plugin.launchAsync {
// Code A
}
}
// 2.x.x
fun foo(){
plugin.launch {
withContext(Dispatchers.IO) {
// Code A
}
}
}
com.github.shynixn.mccoroutine.*
has become either:
com.github.shynixn.mccoroutine.bukkit.*
com.github.shynixn.mccoroutine.sponge.*
com.github.shynixn.mccoroutine.bungeecord.*