Display local currency for fail-requirement if configured

This commit is contained in:
PikaMug 2020-01-24 18:19:05 -05:00
parent c3708755cb
commit 328dec22af

View File

@ -594,11 +594,12 @@ public class Quester {
LinkedList<String> requirements = new LinkedList<String>(); LinkedList<String> requirements = new LinkedList<String>();
OfflinePlayer player = getPlayer(); OfflinePlayer player = getPlayer();
if (reqs.getMoney() > 0) { if (reqs.getMoney() > 0) {
String currency = plugin.getDependencies().getCurrency(reqs.getMoney() == 1 ? false : true);
if (plugin.getDependencies().getVaultEconomy() != null if (plugin.getDependencies().getVaultEconomy() != null
&& plugin.getDependencies().getVaultEconomy().getBalance(player) >= reqs.getMoney()) { && plugin.getDependencies().getVaultEconomy().getBalance(player) >= reqs.getMoney()) {
unfinishedRequirements.add(ChatColor.GREEN + "" + reqs.getMoney() + " " + Lang.get("money")); unfinishedRequirements.add(ChatColor.GREEN + "" + reqs.getMoney() + " " + currency);
} else { } else {
finishedRequirements.add(ChatColor.GRAY + "" + reqs.getMoney() + " " + Lang.get("money")); finishedRequirements.add(ChatColor.GRAY + "" + reqs.getMoney() + " " + currency);
} }
} }
if (reqs.getQuestPoints() > 0) { if (reqs.getQuestPoints() > 0) {