This commit is contained in:
Christian Koop 2021-07-19 18:05:14 +02:00
parent 4affa52e78
commit bd74abf170
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
3 changed files with 8 additions and 7 deletions

View File

@ -85,7 +85,7 @@ public class Farm {
Level level = instance.getLevelManager().getLevel(this.level.getLevel() + 1);
int cost;
if (type == UpgradeType.EXPERIENCE) {
cost = level.getCostExperiance();
cost = level.getCostExperience();
} else {
cost = level.getCostEconomy();
}

View File

@ -10,20 +10,21 @@ public class Level {
private final ArrayList<Module> registeredModules;
private List<String> description = new ArrayList<>();
private int level, costExperiance, costEconomy, radius, pages;
private int level, costExperience, costEconomy, radius, pages;
private double speedMultiplier;
private boolean autoReplant;
Level(int level, int costExperiance, int costEconomy, double speedMultiplier, int radius, boolean autoReplant, int pages, ArrayList<Module> registeredModules) {
Level(int level, int costExperience, int costEconomy, double speedMultiplier, int radius, boolean autoReplant, int pages, ArrayList<Module> registeredModules) {
this.level = level;
this.costExperiance = costExperiance;
this.costExperience = costExperience;
this.costEconomy = costEconomy;
this.speedMultiplier = speedMultiplier;
this.radius = radius;
this.autoReplant = autoReplant;
this.pages = pages;
this.registeredModules = registeredModules;
buildDescription();
}
@ -76,8 +77,8 @@ public class Level {
return speedMultiplier;
}
public int getCostExperiance() {
return costExperiance;
public int getCostExperience() {
return costExperience;
}
public int getCostEconomy() {

View File

@ -123,7 +123,7 @@ public class OverviewGui extends CustomizableGui {
plugin.getLocale().getMessage("interface.button.upgradewithxp").getMessage(),
nextLevel != null
? plugin.getLocale().getMessage("interface.button.upgradewithxplore")
.processPlaceholder("cost", nextLevel.getCostExperiance()).getMessage()
.processPlaceholder("cost", nextLevel.getCostExperience()).getMessage()
: plugin.getLocale().getMessage("event.upgrade.maxed").getMessage()),
event -> {
farm.upgrade(UpgradeType.EXPERIENCE, player);