1.15.2 How to call function every 10 minutes

Discussion in 'Spigot Plugin Development' started by Eben__, Mar 8, 2020.

  1. I basically want to make a function which is called every 10 minutes, there I want to make a clear all entities command, don't need help with that, but it can give you a view on what I want to make.

    Thank you very much, Eben
     
  2. Code (Java):
            Bukkit.getScheduler().scheduleSyncRepeatingTask(YourMainInstance, () -> {
    // Code here
            }, 0, 20*60*10);

    0 = delay

    20*60*10 = 10 Minutes
    20 = Ticks (equals 1 sec)
    60 = seconds
    10 = minutes
     
    • Agree Agree x 1