mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-23 00:49:33 +00:00
1.4.0 beta
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package net.momirealms.customcrops.timer;
|
||||
|
||||
import net.momirealms.customcrops.CustomCrops;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
public class CropTimer {
|
||||
|
||||
int taskID;
|
||||
|
||||
public static void stopTimer(int ID) {
|
||||
Bukkit.getScheduler().cancelTask(ID);
|
||||
Bukkit.getServer().getScheduler().cancelTask(ID);
|
||||
}
|
||||
|
||||
public CropTimer() {
|
||||
TimeCheck tc = new TimeCheck();
|
||||
BukkitTask task = tc.runTaskTimer(CustomCrops.instance, 1,1);
|
||||
this.taskID = task.getTaskId();
|
||||
}
|
||||
|
||||
public int getTaskID() {
|
||||
return this.taskID;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user