guys im trying to make a runnable that does change the delay between 2 executions is it possible in some way Code:java int num = 0;ad = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {@Overridepublic void run() {if (i>0){sender.sendMessage("Counting down: " + i);i--;} else {sender.sendMessage(ChatColor.RED + "Done");Bukkit.getScheduler().cancelTask(ad);}num = rand.nextInt((4 - 0) + 1) + 0;}}, num , 12);}
Gater12 no the problem is that i want "Counting down: " text to come at random delays not with same delay
ulsa Once you have used scheduleRepeatingTaks(), you cannot change the time of it. So you will have to use a normal delayed task and run a new task from that task. Also, your time calculation is very weird: The delay is in server ticks, and 1 second = 20 server ticks. (So your code would use at maximum a fifth of a second as delay)