driftFromMain

inline fun driftFromMain(crossinline runnable: () -> Unit)(source)

Executes the code on separate thread if Thread.currentThread is the current Minecraft Server thread (MinecraftServer.serverThread), otherwise the code is run on current thread

Parameters

runnable

The code to run