9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-26 18:39:17 +00:00
This commit is contained in:
Xiao-MoMi
2022-08-10 09:50:17 +08:00
parent 1ed2c4c424
commit 6fe0fd0115
12 changed files with 659 additions and 5 deletions

View File

@@ -21,6 +21,7 @@ import net.kyori.adventure.platform.bukkit.BukkitAudiences;
import net.momirealms.customcrops.commands.Executor;
import net.momirealms.customcrops.commands.Completer;
import net.momirealms.customcrops.datamanager.*;
import net.momirealms.customcrops.helper.LibraryLoader;
import net.momirealms.customcrops.listener.*;
import net.momirealms.customcrops.timer.CropTimer;
import net.momirealms.customcrops.utils.AdventureManager;
@@ -52,6 +53,12 @@ public final class CustomCrops extends JavaPlugin {
public SeasonManager getSeasonManager() { return seasonManager; }
public PotManager getPotManager() { return potManager; }
@Override
public void onLoad(){
instance = this;
LibraryLoader.load("dev.dejvokep","boosted-yaml","1.3","https://repo.maven.apache.org/maven2/");
}
@Override
public void onEnable() {
@@ -106,16 +113,16 @@ public final class CustomCrops extends JavaPlugin {
this.cropManager.saveData();
this.cropManager = null;
}
if (this.potManager != null){
this.potManager.saveData();
this.potManager = null;
}
if (this.sprinklerManager != null){
this.sprinklerManager.cleanData();
this.sprinklerManager.updateData();
this.sprinklerManager.saveData();
this.sprinklerManager = null;
}
if (this.potManager != null){
this.potManager.saveData();
this.potManager = null;
}
if (ConfigReader.Season.enable && !ConfigReader.Season.seasonChange && this.seasonManager != null){
this.seasonManager.saveData();
this.seasonManager = null;