Number formatting in /mspt and /tps uses the system locale
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 77/100
Research direction
Start by locating PaperMSPTCommand, Spigot's TicksPerSecondCommand, Moonrise's EntityUtil, and the existing RAMDetails locale handling mentioned in the issue. Check how each DecimalFormat is created and compare its output under a German locale with Locale.ROOT formatting. Done means all three outputs use locale independent decimal separators; run the relevant command or entity dump tests if available.
Written by the indexing model from the issue text.
Description
PaperMSPTCommand (new DecimalFormat("########0.0")) and Spigot's TicksPerSecondCommand (new DecimalFormat("########0.0")) don't specify a locale, so the output depends on the JVM's default locale. On a German locale, for example, 19.5 prints as 19,5.
Mojang always formats numbers with Locale.ROOT, and Paper's own RAMDetails already uses DecimalFormatSymbols.getInstance(Locale.ROOT). The server's locale is unrelated to the locale of the players reading the output.
Moonrise's EntityUtil (new DecimalFormat("#,##0.000"), used in entity dumps in logs) has the same issue. Reported upstream at Tuinity/Moonrise#228.
- Dominant language
- Java
- Stars
- 12.8k
- Forks
- 3.6k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PaperMC/Paper
-
Add .getIgniter() to ExplosiveMinecartPossibly taken @WouterGritter claimed this 61 days ago. Openstatus: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PaperMC/Paper#14097 · 1 comment ·
Maintainers usually reply within 1 day
-
BlockType#isOccluding is incorrectly handledPossibly taken @ryoji-ikeda claimed this 205 days ago. Openstatus: accepted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PaperMC/Paper#13790 · 5 comments ·
Maintainers usually reply within 1 day
-
status: needs triage
Difficulty 4/5 3-5 days Newbie friendliness 43/100
PaperMC/Paper#14492 · 2 comments ·
Maintainers usually reply within 1 day
-
[Checkstyle] Ignore check for javadocs into method-local classesPossibly taken @Machine-Maker claimed this 2 days ago. Openstatus: accepted
PaperMC/Paper#14490 · 1 assignee ·
Maintainers usually reply within 1 day
-
Add a dedicated event for Wind Burst effectsPossibly taken @Doc94 claimed this 690 days ago. Openstatus: accepted
Difficulty 5/5 Over a week Newbie friendliness 12/100
PaperMC/Paper#14483 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
floci-io/floci#8791 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
affects/8.10 affects/8.8 affects/8.9 area/reliability component/zeebe kind/bug likelihood/low severity/high
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
geonetwork/geonetwork#276 ·
Maintainers usually reply within 1 day