mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-23 00:49:33 +00:00
1.5.17
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user