Open
Conversation
Format now displays numbers needing commas with them and handles decimal points as well. Example: 1234.5 >>1,234.5 12345>>12,345
Owner
|
Hi @KikoLa663 thank you for your pull request. I have reviewed the code and requested a few changes. Can have combined configuration option with #14 for combined format. |
ez-plugins
requested changes
Feb 6, 2026
Comment on lines
+174
to
181
| /* private String formatCost(double cost) { | ||
| if (cost <= 0.0) { | ||
| return "Free"; | ||
| } | ||
| if (cost == Math.floor(cost)) { | ||
| return String.valueOf((int) cost); | ||
| } | ||
| return String.format(Locale.US, "%.2f", cost); |
| string=String.valueOf(cost); | ||
| } | ||
|
|
||
| String patternString = "(?=(?!^)\\d{3}(?:\\b|(?:\\d{3})+)\\b)"; |
Owner
There was a problem hiding this comment.
Formatting should be optional through configuration option here, is for full GUI
Owner
|
Moved to https://github.com/ez-plugins/EzBoost/blob/main/src/main/java/com/skyblockexp/ezboost/economy/CurrencyFormatter.java for easier implementation in multiple places. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Format now displays numbers needing commas with them and handles decimal points as well. Example:
1234.5 >>1,234.5
12345>>12,345