Fix #5720: color from /nick transfers into balance on /baltop#5728
Closed
TiagoFar78 wants to merge 1 commit intoEssentialsX:2.xfrom
TiagoFar78:2.x
Closed
Fix #5720: color from /nick transfers into balance on /baltop#5728TiagoFar78 wants to merge 1 commit intoEssentialsX:2.xfrom TiagoFar78:2.x
TiagoFar78 wants to merge 1 commit intoEssentialsX:2.xfrom
TiagoFar78:2.x
Conversation
Member
|
This fix technically works, but there are a hundred other instances of legacy converted placeholders bleeding into translations - this general case will be addressed by #5740 which by extension closes this PR as well. |
HarvelsX
pushed a commit
to HarvelsX/Essentials
that referenced
this pull request
Jun 2, 2024
This fixes issues where arguments converted implicitly from MiniMessage are prone to bleeding into the rest of the output. The fix mostly works since `MINI_MESSAGE_NO_TAGS` is only used for legacy conversion, while `miniMessageInstance` is used in all other cases normally. If that were not the case, we would not want strict parsing everywhere since we don't enforce this in translations anyway. Fixes EssentialsX#5729 Fixes EssentialsX#5730 Fixes EssentialsX#5732 Fixes EssentialsX#5735 Fixes EssentialsX#5720 Closes EssentialsX#5728
Starmism
pushed a commit
to valence-smp/Essentials
that referenced
this pull request
Jan 8, 2025
This fixes issues where arguments converted implicitly from MiniMessage are prone to bleeding into the rest of the output. The fix mostly works since `MINI_MESSAGE_NO_TAGS` is only used for legacy conversion, while `miniMessageInstance` is used in all other cases normally. If that were not the case, we would not want strict parsing everywhere since we don't enforce this in translations anyway. Fixes EssentialsX#5729 Fixes EssentialsX#5730 Fixes EssentialsX#5732 Fixes EssentialsX#5735 Fixes EssentialsX#5720 Closes EssentialsX#5728
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.
Information
This PR fixes #5720 .
Details
Proposed fix:
My fix consists in storing the name of the player with a color reseting string at the end. By doing this everytime a /balancetop command is executed the colors in the player name don't spread to the following part of the line.
Environments tested:
OS: Windows 11
Java version: 17.0.9
Demonstration:
Before:
When the command /balancetop was executed the colors from the name of a player would spread to the money amount text, as the following screenshot shows.
After:
I fixed this bug by storing the player's name with a color format reseting string at the end. By doing this I was able to avoid the bug. Other way to solve this would be by adding the color format reseting string after getting the entries from the BalanceTop but it would not solve the case where the entries are used to other things different from showing the balance top to a player.