Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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
 
PREVIOUS NEXT
Tagged: #spigot #cancel #repeating #task
ADD COMMENT
Topic
Name
7+1 =