MineToolsminetools.cn · Minecraft Java Tools

execute Command Generator

Build an execute command step by step: choose who executes it (as), where (at), what conditions to check (if / unless), and where to store the result (store). Each step comes with an easy-to-read explanation and templates for common command patterns.

Loading game data…

The execute command changes the execution conditions before running another command:as changes the executor,at changes the position,if / unless checks a condition,store to store the result, then use run to run the command. For example, /execute as @a at @s if block ~ ~-1 ~ gold_block run effect give @s speed 1 2。

Frequently Asked Questions

What’s the difference between `as` and `at`?

as @a only changes the executor to each player (@s refers to that player), without changing the position;at @s then moves the execution position to that player. They are usually used together:execute as @a at @s run ...。

Does the 1.12 `execute` syntax still work?

No. Starting in 1.13, `execute` changed to the current subcommand syntax, and the old execute @a ~ ~ ~ ... no longer works.