Skip to content

Commit

Permalink
Use economy's format for currency (#2084)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikoo committed Jun 28, 2023
1 parent d154c39 commit 3cd3c33
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,7 @@ else if (cmd.getName().equalsIgnoreCase("buyclaimblocks") && player != null)
double totalCost = blockCount * GriefPrevention.instance.config_economy_claimBlocksPurchaseCost;
if (totalCost > balance)
{
GriefPrevention.sendMessage(player, TextMode.Err, Messages.InsufficientFunds, String.valueOf(totalCost), String.valueOf(balance));
GriefPrevention.sendMessage(player, TextMode.Err, Messages.InsufficientFunds, economy.format(totalCost), economy.format(balance));
}

//otherwise carry out transaction
Expand All @@ -1874,7 +1874,7 @@ else if (cmd.getName().equalsIgnoreCase("buyclaimblocks") && player != null)
this.dataStore.savePlayerData(player.getUniqueId(), playerData);

//inform player
GriefPrevention.sendMessage(player, TextMode.Success, Messages.PurchaseConfirmation, String.valueOf(totalCost), String.valueOf(playerData.getRemainingClaimBlocks()));
GriefPrevention.sendMessage(player, TextMode.Success, Messages.PurchaseConfirmation, economy.format(totalCost), String.valueOf(playerData.getRemainingClaimBlocks()));
}

return true;
Expand Down Expand Up @@ -1950,7 +1950,7 @@ else if (cmd.getName().equalsIgnoreCase("sellclaimblocks") && player != null)
this.dataStore.savePlayerData(player.getUniqueId(), playerData);

//inform player
GriefPrevention.sendMessage(player, TextMode.Success, Messages.BlockSaleConfirmation, String.valueOf(totalValue), String.valueOf(playerData.getRemainingClaimBlocks()));
GriefPrevention.sendMessage(player, TextMode.Success, Messages.BlockSaleConfirmation, economyWrapper.getEconomy().format(totalValue), String.valueOf(playerData.getRemainingClaimBlocks()));
}

return true;
Expand Down

0 comments on commit 3cd3c33

Please sign in to comment.