repeat

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

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

Return

The BukkitTask representing the scheduled task.

Parameters

delay

The duration value for the initial delay.

period

The duration value for the period between subsequent executions.

unit

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

async

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

runnable

The function representing the task to be executed.