I'm trying to make it so that you do /go and there's a timer that goes 2 minutes then 1 minute then 30 seconds then countdown from 10. I'd like it to be 2 minutes long.
use modul here. %<<<< if timer % 90(1.30m) == 0 //this means its 1.30 min. this when its above 10 else every second
this is my countdown: http://forums.bukkit.org/threads/resetting-an-async-repeating-task.106192/ btw, should use the search function. or google. google is your friend
Code: int seconds = 120; int taskID = myPlugin.getServer().getScheduler().scheduleAsyncRepeatingTask(myPlugin, new Runnable() { public void run() { switch(seconds){ case 119: Bukkit.brodcastMessage("2 minutes"); // about 2 minutes break; case 60: Bukkit.brodcastMessage("1 minute"); // 1 min break; case 30: Bukkit.brodcastMessage("30 seconds"); break; case 15: Bukkit.brodcastMessage("30 seconds"); break; } seconds--; } }, 20L, 0) etc
broadcast is not thread safe, ZeusAllMighty11 is incorrectly using a bukkit api methode from outside the bukkit main thread