emerald-extension / cn.berberman.emerald.extension / runOnServerThread
runOnServerThread
fun runOnServerThread(delay: Long = 0L, block: () -> Unit): BukkitTask
Start a task run on main thread. Returns a task that will run on the next server tick.
Parameters
delay - the ticks to wait before running the task, default is 0
block - action to run
Return a BukkitTask that contains the id number