bukkit scheduler
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
public void run() {
}
}, 20, 20);
bukkit scheduler
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
public void run() {
}
}, 20, 20);
bukkit scheduler self cancelling task
new BukkitRunnable() {
int timer = 10;
@Override
public void run() {
if (timer == 0) cancel();
else Bukkit.broadcastMessage("Starting in: " + timer--);
}
@Override // this code can be in run(), its here as a possibility
public synchronized void cancel() throws IllegalStateException {
Bukkit.broadcastMessage("Action!");
super.cancel();
}
}.runTaskTimer(Main.main(), 0L, 20L); // repeat every second
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us