Update version and reset config file

This commit is contained in:
shansen 2020-03-09 12:41:46 +01:00
parent 3493e0b84f
commit b3e9de17e8
3 changed files with 3 additions and 12 deletions

View File

@ -60,16 +60,7 @@ public class EggCatcher extends JavaPlugin {
public void CheckConfigurationFile() {
double configVersion = this.getConfig().getDouble("ConfigVersion", 0.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);
if (configVersion == 5.0) {
this.saveConfig();
} else {
this.saveResource("config.yml", true);

View File

@ -267,4 +267,4 @@ Messages:
CatchChanceFail: "You failed to catch this mob!"
CatchChanceSuccess: ""
HealthPercentageFail: "The mob has more than %s percent health left and cannot be caught!"
ConfigVersion: 3.1
ConfigVersion: 5.0

View File

@ -1,5 +1,5 @@
name: EggCatcher
version: 3.1
version: 5.0
description: This plugin allows you to catch mobs in eggs.
author: shansen
api-version: 1.15