-
Bug
-
Resolution: Fixed
-
Minecraft 18w19b, Minecraft 18w20a, Minecraft 18w22b, 1.16.2, 20w51a, 21w05b
-
Confirmed
-
(Unassigned)
The bug
The scoreboard and commands related to it do not handle entity UUIDs correctly. They treat them like regular player / fake names instead of matching the entity with the respective UUID.
Affected commands
- /scoreboard
- /scoreboard players list
- /scoreboard players set
- /scoreboard players get
- /scoreboard players add
- /scoreboard players remove
- /scoreboard players reset
- /scoreboard players enable
- /scoreboard players operation
- /team
- /team join
- /team leave
- /execute
- /execute if score ... matches
- /execute if score ... = ... (all operators)
- /execute store ... score
Reproduction steps
- Add a scoreboard objective
/scoreboard objectives add test dummy
- Summon an entity with a specific UUID
/summon armor_stand ~ ~ ~ {UUID:[I;0,0,0,0]}
- Set a score for the entity using a selector
/scoreboard players set @e[type=armor_stand,limit=1] test 1
- Set a score for the entity using the UUID
/scoreboard players set 0-0-0-0-0 test 2
- List the scores
/scoreboard players list
There are two entries instead of only one for the entity
Code analysis
1.16.2, Mojang names
net.minecraft.commands.arguments.ScoreHolderArgument.parse(StringReader) only parses the argument as selector (which also covers UUIDs) if the value starts with @ (which is not the case for UUIDs). Otherwise it treats it as literal name.