9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-23 08:59:28 +00:00

1.5.0-SNAPSHOT

This commit is contained in:
Xiao-MoMi
2022-07-04 02:07:14 +08:00
parent f1a2bd6d1c
commit eda25b0bfc
74 changed files with 3379 additions and 5054 deletions

View File

@@ -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 CropTimerAsync {
private final int taskID;
public CropTimerAsync(CustomCrops plugin) {
TimeCheck tc = new TimeCheck(plugin);
BukkitTask task = tc.runTaskTimerAsynchronously(CustomCrops.instance, 1,1);
this.taskID = task.getTaskId();
}
public void stopTimer(int ID) {
Bukkit.getScheduler().cancelTask(ID);
Bukkit.getServer().getScheduler().cancelTask(ID);
}
public int getTaskID() {
return this.taskID;
}
}