sync

fun Any.sync(plugin: Plugin, delayTicks: Long = 0, repeatingTicks: Long = 0, f: () -> Unit): BukkitTask

Executes the given f via the plugin synchronized with the server tick.