9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-23 00:49:33 +00:00
This commit is contained in:
Xiao-MoMi
2022-07-26 14:06:17 +08:00
parent b868b62c55
commit 6bc889d241
13 changed files with 145 additions and 87 deletions

View File

@@ -17,6 +17,7 @@
package net.momirealms.customcrops.timer;
import net.momirealms.customcrops.ConfigReader;
import net.momirealms.customcrops.CustomCrops;
import org.bukkit.Bukkit;
import org.bukkit.scheduler.BukkitTask;
@@ -27,7 +28,12 @@ public class CropTimer {
public CropTimer(CustomCrops plugin) {
TimeCheck tc = new TimeCheck(plugin);
BukkitTask task = tc.runTaskTimer(CustomCrops.instance, 1,1);
BukkitTask task;
if (ConfigReader.Config.asyncCheck){
task = tc.runTaskTimerAsynchronously(CustomCrops.instance, 1,1);
}else {
task = tc.runTaskTimer(CustomCrops.instance, 1,1);
}
this.taskID = task.getTaskId();
}