mcSyncLaunch
Does the same as launch, but the dispatcher defaults to mcCoroutineDispatcher.
This way, you can execute code synchronously (to the MinecraftServer main thread) very easily.
coroutineScope {
mcSyncLaunch {
// suspending and sync now
}
}
Content copied to clipboard