/execute — Execute Command
minecraft — Console Commands
Run commands from entity positions with conditions.
Syntax
/execute <as|at|positioned|if|unless> <entity> <command>
Example
/execute as @a at @s run summon minecraft:lightning_bolt ~ ~ ~
💡 Notes
One of the most powerful and complex commands. Used for map mechanics.
👍 Pros
- Extremely flexible
- Command block magic
- Map mechanics
👎 Cons
- Very complex syntax
- Easy to get wrong
- Can crash with bad loops