Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use economy's format for currency #2084

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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