1

I'm trying to make a countdown called "Preparation", showing the seconds before game starts. In order to do that I created a team, "P" and joined a horse with custom name "TimeRemaining" and an objective called Preparation, setting the horse's score every second, so the sidebar would look like this:

Preparation (objective)

Time Remaining 60 (Seconds based on the horse's score)

But it instead uses the hexadecimal UUID of the horse looking like this:

Preparation

uuu-00045634534547dhninqw843 60

Is there any way to force Minecraft using the customName, or an alternative way to represent the countdown?

3 Answers 3

1

You will need to use a fake player rather than an entity with a custom name.

To set:

/scoreboard players set TimeRemaining Preparation 10

To add/remove:

/scoreboard players remove TimeRemaining Preparation 1
/scoreboard players add TimeRemaining Preparation 1

To test for a value range:

/scoreboard players test TimeRemaining Preparation 0 5
5
  • how do I set a fake player?
    – Lionitow
    Commented Sep 7, 2015 at 17:50
  • @Lionitow First command in this answer
    – SirBenet
    Commented Sep 7, 2015 at 18:27
  • it works, but can I apply a selector like: /scoreboard players remove TimeRemaing[score_min=1] Preparation 1 ? I need the score to never go negative
    – Lionitow
    Commented Sep 7, 2015 at 18:45
  • @Lionitow You can't use selector arguments, as selectors only target existing entities. Instead, test that the value is above 0 like this: /scoreboard players test TimeRemaining Preparation 0, and then use the SuccessCount of that command (comparator, /stats, conditional chain, whatever) to only decrease the score if the test command succeeded. You could also have the fake player score as only the display, and constantly set it to the actual score which is on a real entity (probably best practice prior to 1.9 snapshots).
    – SirBenet
    Commented Sep 7, 2015 at 19:03
  • Fine, I didn't know about that players test. Very useful.
    – Lionitow
    Commented Sep 8, 2015 at 9:01
-1

You could make an armor stand, name it TimeRemaining, and /scoreboard players add TimeRemaining Preparation 1 and it should have the name instead of the UUID. Basically, put the name of the armor stand, not @e[type=armor_stand]

-2

Armor stands and snowballs and non AI entities are the only mobs that show their name not a UUID, I suggest you use Armor stand instead of a horse to do this.

Also make sure your in 1.9 before 1.9 Entities could not join teams.

1
  • ArmorStands will still show their UUID, and entities could join teams before 1.9.
    – SirBenet
    Commented Sep 7, 2015 at 17:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .