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

run_command click events send value as command instead of chat message

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.19 Pre-release 2
    • 1.19 Pre-release 1
    • None
    • Confirmed
    • Commands

      When clicking on a text component that has a run_command click event, the value is treated as a command instead of a message. For text in books and in chat specifically, this means that the preceding slash must now not be included for the command to run. Commands on signs still work with the preceding slash.

      Steps to reproduce:

      Run the command /tellraw @s {"text":"click me","clickEvent":

      {"action":"run_command","value":"/say hi"}

      Click the message

      What I expected to happen:

      The /say hi command would run

      What actually happened:

      I received an error:
      Unknown or incomplete command, see below for error
      /say hi<--[HERE]

            gegy1000 [Mojang] Gegy
            fedpol1 fedpol1
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: