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
Also in Java:
- java how to print a newline
- java clear bufffer to take next string inpuit
- string reverse in java
- java self signed certificate truststore
- java rest client response json
- how to install java runtime environment on centos 7
- how to set a variable java
- java hashmap size
- run java classpath command line
- print a list java
- check if a string is a substring of another string java
- math.pow java
- java get command line input
- android how to know when snackbar is done
- how to detect if someone clicks on a jpanel in java
- in javascipt how to stop further page processing
- HOW TO SUPRESS sonar warning in java code
- java array declaration
- java stream find specific element
- javadoc reference general toString
- leap year program in java
- java how to convert string to int
- java logical operator
- java declare an int inside an if statement