Time Between Lines

Discussion in 'Spigot Plugin Development' started by _Zaboomafoo_, Jun 9, 2015.

  1. Hey all, I am making a plugin and I was wondering if I could add time between the lines of code. Such as when a player right clicks a compass it will spawn a zombie then 3 seconds later another zombie will spawn from the same event. Thanks.
  2. Make sure you don't run a new thread/runnable every time they right click with a compass, it'll lead to a crap ton of zombie spawning..
    • Agree Agree x 1
  3. Use the repeating schedule.
  4. Use repeating schedule
  5. Bukkit.getScheduler.scheduleRepeatingTask(plugin, new Runnable() {
    this.getForum().getCurrentThread().post("Use repeating schedule");
    }, 1);
    • Like Like x 1
    • Creative Creative x 1