2

I have been experimenting with changing the colour of player names in Minecraft's scoreboard system.

In Bedrock Edition, you can set the colour of a scoreboard's fake player name by using the section sign §, which uniquely works, unlike Java Edition.

In Java Edition, you set the colour of a fake player's name by using teams, for example, adding a fake name to a team of colour green, and then displaying it on scoreboard.

However, using the section sign § in Bedrock Edition has an interesting function that I am unable to replicate in Java Edition. You can insert multiple section signs § to make multi-coloured names, and even change the formatting of the text, all using the fake player's name.

Is it possible, through an alternative way, to replicate this on Java Edition?

2

Team prefixes/suffixes seem to be the only way to do this, because fake player names in /scoreboard cannot be JSON. Only the part that has the last colour is the actual fake player name. If that leads to name collisions, you can use suffixes as well, that way you can pick any coloured part of the name to be the actual fake player name.

Here's an example with three colours:

/scoreboard objectives add color_test dummy
/scoreboard objectives setdisplay sidebar color_test
/scoreboard players set c color_test 1
/team add color_test
/team join color_test c
/team modify color_test color yellow
/team modify color_test prefix {"text":"a","color":"blue","extra":[{"text":"b","color":"green"}]}

"extra" is an array, you can put as many JSON compounds into it as you want.

The result of the example commands:

| improve this answer | |
  • What are name collisions? – ExpertCoder14 May 23 at 18:20
  • Two things having the same name, so you try to do something for one thing, but it ends up doing something for another thing, or both, or none, or crazy stuff happens. In the case of fake players in scoreboards, you would just end up not creating another one and overwrite everything from the old one. – Fabian Röling May 23 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.