Add configuration updater
This commit is contained in:
parent
b915530a30
commit
e313a1c41c
|
@ -57,7 +57,16 @@ public class EggCatcher extends JavaPlugin {
|
|||
|
||||
public void CheckConfigurationFile() {
|
||||
double configVersion = this.getConfig().getDouble("ConfigVersion", 0.0);
|
||||
if (configVersion == 3.0) {
|
||||
if (configVersion == 3.1) {
|
||||
this.saveConfig();
|
||||
}
|
||||
else if (configVersion == 3.0) {
|
||||
this.getConfig().set("CatchChance.Parrot", 100.0);
|
||||
this.getConfig().set("VaultCost.Parrot", 0.0);
|
||||
this.getConfig().set("ItemCost.Amount.Parrot", 0.0);
|
||||
this.getConfig().set("HealthPercentage.Parrot", 100.0);
|
||||
|
||||
this.getConfig().set("ConfigVersion", 3.1);
|
||||
this.saveConfig();
|
||||
} else {
|
||||
this.saveResource("config.yml", true);
|
||||
|
|
Loading…
Reference in New Issue