1

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?

  • I think not.. That's the zombie's UUID , the ID which makes the zombie unique . The scoreboard works by the UUIDs of the entities – iDoomfull Jul 6 '16 at 18:39
  • @iDoomfull Actually there is a workaround, see my answer. – Jacques Marais Jul 6 '16 at 18:54
2

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.

| improve this answer | |
  • I followed steps, but sidebar still shows the numerical UUID – David Jul 6 '16 at 18:54
  • @DavidCole-GrammarPolice It works for me. Did you reset the Zombie's score of bossHealth? – Jacques Marais Jul 6 '16 at 18:55
  • @DavidCole-GrammarPolice Also remember to keep the original bossHealth objective in the sidebar. – Jacques Marais Jul 6 '16 at 18:58
  • @DavidCole-GrammarPolice This one works for me also – 123 Jul 6 '16 at 19:02
  • Okay , let me try to start from scratch, I was trying to implement this into an existing system. Will accept answer if works :) – David Jul 6 '16 at 19:03

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.