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-23 20:00:40 +08:00
parent 1955677b06
commit f9761f2fe6
12 changed files with 51 additions and 10 deletions

View File

@@ -44,7 +44,7 @@ public class ConfigReader {
public static HashMap<String, WateringCan> CANS = new HashMap<>();
public static HashMap<String, Sprinkler> SPRINKLERS = new HashMap<>();
private static YamlConfiguration getConfig(String configName) {
public static YamlConfiguration getConfig(String configName) {
File file = new File(CustomCrops.instance.getDataFolder(), configName);
if (!file.exists()) {
CustomCrops.instance.saveResource(configName, false);
@@ -227,6 +227,14 @@ public class ConfigReader {
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><gold>Lands <color:#FFEBCD>Hooked!");
}
}
if(config.getBoolean("config.integration.GriefPrevention",false)){
if(Bukkit.getPluginManager().getPlugin("GriefPrevention") == null){
CustomCrops.instance.getLogger().warning("Failed to initialize GriefPrevention!");
}else {
integration.add(new GriefPrevention());
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><gold>GriefPrevention <color:#FFEBCD>Hooked!");
}
}
}
}