diff --git a/src/main/java/me/shansen/EggCatcher/EggCatcher.java b/src/main/java/me/shansen/EggCatcher/EggCatcher.java index ce584bc..dbdfe1e 100644 --- a/src/main/java/me/shansen/EggCatcher/EggCatcher.java +++ b/src/main/java/me/shansen/EggCatcher/EggCatcher.java @@ -72,7 +72,25 @@ public class EggCatcher extends JavaPlugin { public void CheckConfigurationFile() { double configVersion = this.getConfig().getDouble("ConfigVersion", 0.0); - if (configVersion != 2.00) { + if (configVersion == 2.0) { + this.getConfig().set("CatchChance.Endermite", 100.0); + this.getConfig().set("VaultCost.Endermite", 0); + this.getConfig().set("ItemCost.Endermite", 0); + this.getConfig().set("HealthPercentage.Endermite", 100.0); + + this.getConfig().set("CatchChance.Guardian", 100.0); + this.getConfig().set("VaultCost.Guardian", 0); + this.getConfig().set("ItemCost.Guardian", 0); + this.getConfig().set("HealthPercentage.Guardian", 100.0); + + this.getConfig().set("CatchChance.Rabbit", 100.0); + this.getConfig().set("VaultCost.Rabbit", 0); + this.getConfig().set("ItemCost.Rabbit", 0); + this.getConfig().set("HealthPercentage.Rabbit", 100.0); + + this.getConfig().set("ConfigVersion", 2.2); + this.saveConfig(); + } else { this.saveResource("config.yml", true); this.reloadConfig(); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 201fe21..0c7b8c7 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -137,5 +137,5 @@ Messages: CatchChanceFail: "You failed to catch this mob!" CatchChanceSuccess: "" HealthPercentageFail: "The mob has more than %s percent health left and cannot be caught!" -ConfigVersion: 2.00 +ConfigVersion: 2.2 CheckForUpdates: true \ No newline at end of file