mojira.dev
MC-300896

Suggest Commands Click Event doesn't work in the body of a Dialog

Text components are all supposed to work in the body section of a dialog. If you include a click event which suggests a command it doesn’t work, however. It does correctly close the dialog, but it doesn’t actually suggest the command in chat like its supposed to.

Below is an example dialog file where this bug occurs. To replicate, load this file in a datapack, open the dialog, and click the text. The dialog will close but chat will not open to suggest the command.

{
  "type": "minecraft:notice",
  "title": "§b§lCommand List",
  "body": [
{
  "type": "minecraft:plain_message",
  "contents": [{"text":"/dialog","color":"#55FFFF", "click_event":{"action":"suggest_command", "command":"/dialog"}}],
  "width": 600
}
  ],
  "inputs": [],
  "can_close_with_escape": true,
  "after_action": "close",
  "pause": false,
"actions": []
  }

Comments 4

suggest_command do not work with actions as well.

Please attach a datapack that can be used to reproduce the issue

@[MOD] Greymagic27

Issue(both the body and action ones) can be reproduced with the following command:

/dialog show @p {type:"minecraft:notice",title:"Test",body:[{type:"minecraft:plain_message",contents:{text:"click1",click_event:{action:"suggest_command",command:"/say hello"}}}],action:{label:"click2",action:{type:"suggest_command",command:"/help"}}}

Can confirm, I’ve also noticed this behaviour.

Going

(Unassigned)

Confirmed

(Unassigned)

1.21.8

Retrieved