Condensed Mob Names in Scoreboard

I am using this command to add a scoreboard so that the health of a mob can be seen:

/scoreboard players set @e[type=Zombie,name=Joe] bossHealth 100

And I want it to come up on the scoreboard as

Joe 100

But instead it shows up as

0fb6ee26-3210-45b2-8043-ecab01afe679 100

Is there a way to bypass this?


Yes, there is indeed a way to bypass this. First of all, create another scoreboard objective that will be used as the dummy objective:

/scoreboard objectives add bossHealth_1 dummy

Now place a repeating command block containing the following command:

/scoreboard players operation Joe bossHealth = @e[type=Zombie,name=Joe] bossHealth_1

Keep the bossHealth objective in the sidebar as a scoreboard. Then, every time that you want to change the bossHealth objective, change the bossHealth_1 objective instead and the bossHealth objective wil change automatically.

This is because the scoreboard operations command will change the first entity's specific score (the Joe bossHealth part) according to the second entity's other specific score (the @e[type=Zombie,name=Joe] bossHealth_1 part), by the operation provided (the = part)

For more about the scoreboard operations command, click here and scroll to the bottom of the table.