9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-23 08:59:28 +00:00
This commit is contained in:
Xiao-MoMi
2022-08-02 16:02:53 +08:00
parent 3b02acf333
commit f3a09d94e0
18 changed files with 800 additions and 492 deletions

View File

@@ -21,10 +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.listener.BreakBlock;
import net.momirealms.customcrops.listener.InteractEntity;
import net.momirealms.customcrops.listener.ItemSpawn;
import net.momirealms.customcrops.listener.RightClick;
import net.momirealms.customcrops.listener.*;
import net.momirealms.customcrops.timer.CropTimer;
import net.momirealms.customcrops.utils.AdventureManager;
import net.momirealms.customcrops.utils.BackUp;
@@ -77,6 +74,8 @@ public final class CustomCrops extends JavaPlugin {
Bukkit.getPluginManager().registerEvents(new ItemSpawn(), this);
Bukkit.getPluginManager().registerEvents(new RightClick(), this);
Bukkit.getPluginManager().registerEvents(new BreakBlock(), this);
Bukkit.getPluginManager().registerEvents(new JoinAndQuit(), this);
Bukkit.getPluginManager().registerEvents(new BreakFurniture(), this);
Bukkit.getPluginManager().registerEvents(new InteractEntity(this), this);
if (ConfigReader.Season.enable){
@@ -103,6 +102,7 @@ public final class CustomCrops extends JavaPlugin {
if (this.cropManager != null){
this.cropManager.cleanData();
this.cropManager.updateData();
this.cropManager.saveData();
this.cropManager = null;
}
@@ -112,6 +112,7 @@ public final class CustomCrops extends JavaPlugin {
}
if (this.sprinklerManager != null){
this.sprinklerManager.cleanData();
this.sprinklerManager.updateData();
this.sprinklerManager.saveData();
this.sprinklerManager = null;
}