Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-126479

Tellraw command only applies team color if using selector to target more than one entity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.13-pre4
    • Minecraft 1.12.2, Minecraft 18w08b, Minecraft 18w09a, Minecraft 18w10a, Minecraft 18w11a
    • None
    • Windows 10, Java version 8 update 91. (I don't believe this issue is specific to the environment.)
    • Confirmed

      When using the /say command to say the name of an entity, e.g.
      "/say @a"
      It is always the case, that the name(s) said are in the colour of the team they are assigned to.

      When using the "/tellraw" command however, e.g.
      "/tellraw @s [

      {"selector":"@a"}

      ]"
      The team colors are only applied if the selector returns more than one entity. This is problematic when using team colors as a way to format parts of a longer /tellraw command.

      Follow these steps to reproduce:
      1 Create a new world in the 1.13 snapshot
      2 Run this command: "/summon armor_stand ~ ~ ~ {Tags:["Tag1","Tag3"]}"
      3 Run this command: "/summon armor_stand ~ ~ ~ {Tags:["Tag2","Tag3"]}"
      
      4 Run this command: "/team add Test1"
      5 Run this command: "/team add Test2"
      
      6 Run this command: "/team option Test1 color red"
      7 Run this command: "/team option Test2 color blue"
      
      8 Run this command: "/team join Test1 @e[tag=Tag1]"
      9 Run this command: "/team join Test2 @e[tag=Tag2]"
      
      10 Run the commands "/say @e[tag=Tag1]" and "/say @e[tag=Tag2]". You will note, that the
           team color is properly displayed on the names.
      11 Run the commands "/tellraw @s [{"selector":"@e[tag=Tag1]"}]" and "/tellraw @s 
           [{"selector":"@e[tag=Tag2]"}]". You will note, that the team color is not displayed on the 
           names. The team color will however display if the selector returns more than one entity. 
           This can be observed by running the command: "/tellraw @s [{"selector":"@e[tag=Tag3]"}]". 
           /say also works this way, which is as expected: "/say @e[tag=Tag3]"
      

      The results of the commands can be seen on the attached images.

      Doesn't only affect team color, all components except plain text seems to be affected. See comments for more info.

        1. 1.JPG
          40 kB
          Anton Bertelsen
        2. 2.JPG
          38 kB
          Anton Bertelsen
        3. 3.JPG
          40 kB
          Anton Bertelsen
        4. 4.JPG
          39 kB
          Anton Bertelsen
        5. 5.JPG
          39 kB
          Anton Bertelsen
        6. 6.JPG
          41 kB
          Anton Bertelsen

            Unassigned Unassigned
            ThatTacocat Anton Bertelsen
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: