bukkit Scheduler Programming Scheduler Repeating task


The time for Scheduler Tasks are measured in Ticks. Under normal conditions, there are 20 ticks per second.

Tasks scheduled with .scheduleSyncRepeatingTask will be run on the Main Thread

Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
    public void run() {
        Bukkit.broadcastMessage("This message is shown immediately and then repeated every second");
}, 0L, 20L); //0 Tick initial delay, 20 Tick (1 Second) between repeats