Minecraft – Why does clickevent in minecraft not work

minecraft-commandsminecraft-java-edition

I have a tellraw command in Minecraft and all of the text appears but upon clicking the text I want all players to die. But instead of all players dying nothing happens. Here is my command:

tellraw @a {"text":"Kill all people?""color":"green","clickEvent":{CommandValue":"/kill @a"}}`

Best Answer

You have two things missing or wrong.

  • "text":"Kill all people?""color":"green" is invalid JSON - it's missing a comma
  • clickEvent uses the action run_command to execute commands

Taking both into account this will work assuming you're using the latest version of Minecraft:

/tellraw @a {"text":"Kill all people?","color":"green","clickEvent":{"action":"run_command","value":"/kill @a"}}

Related Topic