If you create a Dialog with buttons, one that execute for example “/say Test“ and the 2nd that suggest thr command “tellraw @s “test”“ for example. The buttons didn't do anything when clicked on them…
I didn't saw in change logs, where it says that we can't execute say command in dialogs and we can't suggest command in dialogs with buttons.
Steps to reproduce :
Place an Impulse Command Block with this command inside :
dialog shop @p { "type": "minecraft:multi_action", "title": { "text": "Test", "bold": true }, "body": { "type": "minecraft:plain_message", "contents": "When you cancel, it execute : /say cancel", "width": 150 }, "on_cancel": { "action": "run_command", "command": "/say cancel" }, "columns": 2, "actions": [ { "label": { "text": "Run "say" command", "color": "red" }, "tooltip": { "text": "Doesn't works", "color": "red" }, "width": 150, "on_click": { "action": "run_command", "command": "/say test" } }, { "label": { "text": "Suggest "say" Command", "color": "red" }, "tooltip": { "text": "Doesn't works", "color": "red" }, "width": 150, "on_click": { "action": "suggest_command", "command": "/say Test 2" } }, { "label": { "text": "Open URL", "color": "green" }, "tooltip": { "text": "Works", "color": "green" }, "width": 85, "on_click": { "action": "open_url", "url": "https://it-works.test" } }, { "label": { "text": "Suggest "Test" text", "color": "red" }, "tooltip": { "text": "Doesn't works", "color": "red" }, "width": 125, "on_click": { "action": "suggest_command", "command": "Test" } }, { "label": { "text": "Run "tellraw" command", "color": "green" }, "tooltip": { "text": "Works", "color": "green" }, "width": 150, "on_click": { "action": "run_command", "command": "tellraw @a {text:"Test",bold:true,color:dark_red,underlined:true,italic:true}" } }, { "label": { "text": "Suggest "tellraw" command", "color": "red" }, "tooltip": { "text": "Doesn't works", "color": "red" }, "on_click": { "action": "suggest_command", "command": "tellraw @a {text:"Test",bold:true,color:dark_red,underlined:true,italic:true}" } }, { "label": { "text": "Run "trigger" command", "color": "green" }, "tooltip": { "text": "Works", "color": "green" }, "on_click": { "action": "run_command", "command": "/trigger test set 10" } }, { "label": { "text": "Suggest "trigger" command", "color": "red" }, "tooltip": { "text": "Doesn't works", "color": "red" }, "width": 150, "on_click": { "action": "suggest_command", "command": "/trigger test set 10" } } ] }
Place a button on the command block
Press the button
Try to click on every buttons by re pressing the button to re open the dialog and re click pn a button
Observed result :
All buttons that the label is green works when you clicked on them, but buttons that the label is red didn't do anything when you clicked on them.
Expected result :
All buttons that the label is green works when you clicked on them, but buttons that the label is red didn't do anything when you clicked on them.
Environment
Java Edition
Windows 10
Comments 10
FalsonAuYeung so we can only send messages with tellraw
, title
, … for example ? but not say
, whisper
, tell
, teammsg
, … because it’s like a message send by the player ?
But these are still commands, so logically they should be executed by the player.
FalsonAuYeung however, we should be allowed to suggest commands with dialog, we can suggest command by clicking on text of tellraw but we can’t by clicking a button in a dialog…
Now I understand where the problem might lie. The original behavior of the chat box clicking on text to pop up suggestions has failed in "dialog.action.on_click", which was expected to provide suggestions.
However, logically, we first press "T" and then click on the text to get suggestions, but here, clicking the action does not involve pressing the chat box beforehand, so there is a logical issue.
Nonetheless, I suspect that nesting suggestions in tellraw might be feasible.
I see what you mean, as suggest_command is usually used in tellraw, the chat is usually open, so it just automatically writes the command in the text box, but here as the chat is not open but only the dialog, it doesn't work, you'd have to press the button to open the chat, then write the suggest_command in the text box.
Thank you for your report!
After consideration, the issue is being closed as Invalid.
You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Not being able to impersonate the player is Working as Intended - the rest of the report is a feature request.
slicedlime
? The say command is not for impersonate the player, but make the player write a message, we can already execute the say command in tellraw, and it’s not for impersonate the player
Text component format – Minecraft Wiki:
“However, this can only be used to run commands that do not send chat messages directly (like
/say
,/tell
, and/teammsg
). Since they are being run from chat, the player must have the required permissions.“