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

JSON text selectors have always predefined clickEvent and hoverEvent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.16 Pre-release 3
    • Minecraft 14w20b, Minecraft 14w28b, Minecraft 14w29b, Minecraft 14w30c, Minecraft 14w31a, Minecraft 1.8-pre2, Minecraft 1.8.8, Minecraft 15w50a, Minecraft 1.10.2, Minecraft 16w41a, Minecraft 16w42a, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.13.1, 1.15.2, 1.16.2 Pre-release 1
    • Confirmed
    • Commands
    • Low
    • Platform

      The bug

      When you use a selector:@p in a /tellraw command and then execute it, it will ignore hoverEvent and clickEvent, instead it will show your UUID and when you click it, it suggests the /msg command. This limits the use of the /tellraw command in combination with selectors drastically.

      How to reproduce

      /tellraw @p {"selector":"@p","hoverEvent":{"action":"show_text","value":"Test"},"clickEvent":{"action":"run_command","value":"/say Test"}}
      

      Maybe the suggested /msg Player is useful, so I would rather recommend, that when something other is given than the "selector:@p" for example a different clickEvent only then it should use the different clickEvent.

      Note: This behaviour is consistent for all game elements that support JSON-text. So also signs and books get the suggest_command action which does not work for them.

            Unassigned Unassigned
            marcono1234 [Mod] Marcono1234
            Votes:
            11 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: