mojira.dev
MC-112693

Scoreboard team colors use raw § formatting instead of text components

The bug

Scoreboard team name coloration uses legacy §-based formatting.

To reproduce

By running the following commands:

/scoreboard teams add test
/scoreboard teams option test color red
/scoreboard teams join test
text

The following will be placed in the log file:

[Server thread/INFO]: <§cpokechu22§r> text
[Client thread/INFO]: [CHAT] <§cpokechu22§r> text

This only happens for situations where § is used directly; in other cases of formatting (such as using /tellraw) this does not happen.

This can also be seen by inspecting data/scoreboard.dat, where it can be seen that Prefix and Suffix contain §-based format codes.

Proposed fix

The ideal fix would be to get rid of Prefix and Suffix entirely and instead serialize a text component style within the team. To port to this system, the existing TeamColor tag could be used.

However, there may be custom maps that use modified Prefix and Suffix values. This could be dealt with by testing the §-code that the color would produce against Prefix and §r against Suffix - if they do not match, then don't migrate (or migrate in a more complex way).

See also Solution discussion for upgrading legacy formatted scoreboard prefix and suffix to text components.

Related issues

Comments

No comments.

pokechu22

Nathan Adams

Confirmed

chat, formatting, formatting-codes, scoreboard, scoreboard-color-names, text

Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13a, Minecraft 17w13b, Minecraft 17w14a, ..., Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w46a, Minecraft 17w48a, Minecraft 17w50a

Minecraft 18w01a

Retrieved