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); Level level = instance.getLevelManager().getLevel(this.level.getLevel() + 1);
int cost; int cost;
if (type == UpgradeType.EXPERIENCE) { if (type == UpgradeType.EXPERIENCE) {
cost = level.getCostExperiance(); cost = level.getCostExperience();
} else { } else {
cost = level.getCostEconomy(); cost = level.getCostEconomy();
} }

View File

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

View File

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