delay

fun delay(value: Long, unit: TimeUnit = TimeUnit.MILLISECONDS, async: Boolean = false, runnable: ShardRunnable.() -> Unit): ShardRunnable

Schedules a delayed task to be executed by the Bukkit scheduler.

Return

The ShardRunnable representing the scheduled task.

Parameters

value

The duration value for the delay.

unit

The TimeUnit representing the time unit of the delay (default: MILLISECONDS).

async

Whether the task should be executed asynchronously (default: false).

runnable

The function representing the task to be executed.