Update version and reset config file
This commit is contained in:
parent
3493e0b84f
commit
b3e9de17e8
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue