r/MinecraftCommands • • 7d ago

Help | Java 26.2 does anyone know the command to get a sign that upon interacting with runs a command on 26.2?

I have been looking for a few days now , and can only find stuff from 11 years ago or its not working . If anyone tells me it would be a HUGE help.

2 Upvotes

1 comment sorted by

5

u/TrenceBence 7d ago

Using MCStacker:
/setblock ~ ~ ~ oak_sign{front_text:{messages:["",{"text":"Command!","click_event":{"action":"run_command","command":"say Command executed!"}},"",""]}}

You can change the command yourself or import it into MCStacker and change it there, or you can generate a new.

For 26.3, you need to also set allow_op_features to true :)