Skip to content

Commit

Permalink
Fix SpigotMC#3623: Do not add white (default) color if its unset when…
Browse files Browse the repository at this point in the history
… converting to legacy.

In Tests: Add static ChatColor import, replace all usages of '§' with ChatColor.

Co-authored-by: bob7l <[email protected]>
  • Loading branch information
Janmm14 and bob7l committed Feb 27, 2024
1 parent 7606d44 commit 32c4f22
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,10 @@ void toLegacyText(StringBuilder builder)

void addFormat(StringBuilder builder)
{
builder.append( getColor() );
if ( style.hasColor() || parent != null )
{
builder.append( getColor() );
}
if ( isBold() )
{
builder.append( ChatColor.BOLD );
Expand Down
Loading

0 comments on commit 32c4f22

Please sign in to comment.