Answers for "cancel repeating task from within task spigot"

2

spigot cancel repeating task

int taskID;
public void startCountdown(){
	taskID = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this,new Countdown(),20L,20L);
}
public void stopCountdown(){
	Bukkit.getServer().getScheduler().cancelTask(taskID);
}
// 20L = 1 Second
Posted by: Guest on May-14-2020

Code answers related to "cancel repeating task from within task spigot"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language