Skip to content

Commit

Permalink
Merge pull request #6263 from LaBoulangerie/town_nation_balance_unfor…
Browse files Browse the repository at this point in the history
…matted_placeholders

Added placeholders
  • Loading branch information
LlmDl authored Oct 28, 2022
2 parents f34ef07 + c887e57 commit 2ab8aed
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,18 @@ private String getOfflinePlayerPlaceholder(OfflinePlayer player, String identifi
if (resident.hasTown() && TownyEconomyHandler.isActive())
balance = TownyEconomyHandler.getFormattedBalance(resident.getTownOrNull().getAccount().getCachedBalance());
return balance;
case "town_balance_unformatted": // %townyadvanced_town_balance_unformatted%
if (resident.hasTown() && TownyEconomyHandler.isActive())
balance = String.valueOf(resident.getTownOrNull().getAccount().getCachedBalance());
return balance;
case "nation_balance": // %townyadvanced_nation_balance%
if (resident.hasNation() && TownyEconomyHandler.isActive())
balance = TownyEconomyHandler.getFormattedBalance(resident.getTownOrNull().getNationOrNull().getAccount().getCachedBalance());
return balance;
case "nation_balance_unformatted": // %townyadvanced_nation_balance_unformatted%
if (resident.hasNation() && TownyEconomyHandler.isActive())
balance = String.valueOf(resident.getTownOrNull().getNationOrNull().getAccount().getCachedBalance());
return balance;
case "town_tag": // %townyadvanced_town_tag%
if (resident.hasTown())
tag = String.format(TownySettings.getPAPIFormattingTown(), resident.getTownOrNull().getTag());
Expand Down

0 comments on commit 2ab8aed

Please sign in to comment.