mojira.dev
MC-76312

Testfor output doesn't show UUID or team colour

The /kill command chat output will display the entity type and UUID when hovered over. The /testfor output doesn't. Neither do any scoreboard commands.


Code analysis by @unknown can be found in this comment.

Environment

Operating system: OSX 10.9.5
Java Version: 1.6.0_65

Attachments

Comments 5

Tested, looks like it's true. When the /testfor command is used, it does not show the UUID for all entities.

Please link to this comment in the description of the report.

The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.

The reason why this happens is that multiple commands call the public String getName() method (returns plain text) of the net.minecraft.entity.Entity class instead of the public IChatComponent getDisplayName() method.

Affected commands are (in 1.8):

  • /clear

  • /effect

  • /execute

  • /gamemode

  • /give

  • /playsound

  • /kick

  • /spawnpoint

  • /xp

  • /achievement

  • /ban-ip1

  • /ban1

  • /scoreboard1

  • /tp

  • /testfor

  • Command notifications for admins

1 The player name as String is here used to execute the command but to display the entity name as well

Fixed in some snapshot.

migrated

(Unassigned)

Confirmed

Minecraft 1.8.2-pre1, Minecraft 15w45a, Minecraft 1.9, Minecraft 16w33a, Minecraft 1.12.2

Minecraft 18w02a

Retrieved