mirror of
https://github.com/shansen/EggCatcher.git
synced 2024-11-22 18:16:15 +01:00
Updated configuration file updater
This commit is contained in:
parent
dbf74377d5
commit
3b613360d4
@ -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();
|
||||
}
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user