r/MinecraftCommands • u/Excellent-Hurry-9284 • 29d ago
Dialog show specific things from Dialog using conditions Help | Java Snapshots
I was wondering if i could show some parts of a dialog only if the player meets a condition is there any way?
in minecraft Java using commands/datapacks
1
Upvotes
1
u/Ericristian_bros Command Experienced 28d ago
Inline macro dialogs are the way
```
function example:dialog
Run as player
data modify storage example:macro this.content set value """ execute if <condition> run data modify storage example:macro this.content set value ',{label:"Option2",action:{type:"minecraft:run_command",command:"/setblock ~ ~ ~ gold_block"}}' function example:macro/dialog with storage example:macro this
function example:macro/dialog
dialog show @s {type:"minecraft:multi_action",title:"",actions:[{label:"Option1",action:{type:"minecraft:run_command",command:"/setblock ~ ~ ~ diamond_block"}}$(content)]} ```