Gameplay
/execute
The most powerful command in Minecraft. /execute lets you change who runs a command, where it runs from, and conditional checks (if/unless), then runs another command. Chains multiple subcommands.
Syntax
Parameters
- subcommand
- literal
- as / at / positioned / facing / rotated / in / on / if / unless / store / align / anchored / summon
- command
- command
- The command to run with the modified context.
Command builder
Configure the options below to generate a ready-to-paste /execute command.
/execute chains context modifiers before running a command. This builder covers the most common clauses; subcommands can be nested far deeper in-game.
/execute as @e at @s run say hiExamples
Spawn a firework at each player.
Conditional run based on scoreboard.
Mark players with 10+ kills as glowing.
Permission level
/execute requires Cheats (op level 2). In single-player you need the world's "Allow Cheats" toggle on. On a multiplayer server you need to be opped — see /op.