From 917ef27980d475c05dad65ce5517f9991a4276ac Mon Sep 17 00:00:00 2001 From: rbluer <665978+rbluer@users.noreply.github.com> Date: Sat, 20 Apr 2024 23:23:39 -0400 Subject: [PATCH] Placeholder bug: The placeholder 'prison_rankup_cost_percent' uses the calculated value of a percentage, but when used with the placeholder attribute, it was found to use the price instead. As such, the actual value returned for the placeholder was incorrect. --- docs/changelog_v3.3.x.md | 5 ++++- .../tech/mcprison/prison/ranks/managers/PlayerManager.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/changelog_v3.3.x.md b/docs/changelog_v3.3.x.md index 854d0aa1d..25fba48b3 100644 --- a/docs/changelog_v3.3.x.md +++ b/docs/changelog_v3.3.x.md @@ -14,7 +14,10 @@ These change logs represent the work that has been going on within prison. -# 3.3.0-alpha.16c 2024-04-07 +# 3.3.0-alpha.16c 2024-04-20 + + +* **Placeholder bug: The placeholder 'prison_rankup_cost_percent' uses the calculated value of a percentage, but when used with the placeholder attribute, it was found to use the price instead.** As such, the actual value returned for the placeholder was incorrect. * **Player Manager: Secondary Placeholders: Setup the secondary placeholder support on the PlayerManager, but it has not been enabled yet** since secondary placeholders on placeholders do not make a lot of sense because each placeholder is only one value and they cannot contain alternative text. At least not yet. diff --git a/prison-ranks/src/main/java/tech/mcprison/prison/ranks/managers/PlayerManager.java b/prison-ranks/src/main/java/tech/mcprison/prison/ranks/managers/PlayerManager.java index 30f5dc82c..01fc9253e 100644 --- a/prison-ranks/src/main/java/tech/mcprison/prison/ranks/managers/PlayerManager.java +++ b/prison-ranks/src/main/java/tech/mcprison/prison/ranks/managers/PlayerManager.java @@ -729,7 +729,7 @@ public String getPlayerNextRankCostPercent( RankPlayer rankPlayer, String ladder if ( attributeNFormat != null ) { - sb.append( attributeNFormat.format( cost ) ); + sb.append( attributeNFormat.format( percent ) ); } else {