Skip to content

Commit

Permalink
Stop error when vault not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume-Lebegue committed Jul 17, 2020
1 parent 186f0fa commit ce4ebf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/world/bentobox/upgrades/ui/Panel.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ private List<String> getDescription(User user, Upgrade upgrade, int islandLevel)
if (upgrade.getUpgradeValues(user) == null)
descrip.add(user.getTranslation("upgrades.ui.upgradepanel.maxlevel"));
else {
boolean hasMoney = this.addon.getVaultHook().has(user, upgrade.getUpgradeValues(user).getMoneyCost());
if (this.addon.isLevelProvided()) {
descrip.add((upgrade.getUpgradeValues(user).getIslandLevel() <= islandLevel ? "§a" : "§c") +
user.getTranslation("upgrades.ui.upgradepanel.islandneed",
"[islandlevel]", Integer.toString(upgrade.getUpgradeValues(user).getIslandLevel())));
}

if (this.addon.isVaultProvided()) {
boolean hasMoney = this.addon.getVaultHook().has(user, upgrade.getUpgradeValues(user).getMoneyCost());
descrip.add((hasMoney ? "§a" : "§c") +
user.getTranslation("upgrades.ui.upgradepanel.moneycost",
"[cost]", Integer.toString(upgrade.getUpgradeValues(user).getMoneyCost())));
Expand Down

0 comments on commit ce4ebf6

Please sign in to comment.