Minecraft Bedrock /execute Command

Bedrock commands

Executes a command on behalf of one or more objects.

  • operator and command block
  • cheats are needed
  • Bedrock 1.26.50.4
My Game select version

Save your preferences in this browser and apply them to supported tools. Settings in a shared link take priority. Wiki version labels are not affected.

On this page 6 sections

At a glance

Syntax and parameters — below

Executes a command on one or more entities. Requires enabled cheats. In Java, a similar command is — /execute, but is stored differently.

How to record?

  • /execute as <origin> <chainedCommand>
  • /execute at <origin> <chainedCommand>
  • /execute in <dimension> <chainedCommand>
  • /execute positioned <position> <chainedCommand>
  • /execute positioned as <origin> <chainedCommand>
  • /execute rotated <yaw> <pitch> <chainedCommand>
  • /execute rotated as <origin> <chainedCommand>
  • /execute facing <position> <chainedCommand>
  • /execute facing entity <origin> <anchor> <chainedCommand>
  • /execute align <axes> <chainedCommand>
  • /execute anchored <anchored> <chainedCommand>
  • /execute <subcommand> block <position> <block> [chainedCommand]
  • /execute <subcommand> block <position> <block> <blockStates> [chainedCommand]
  • /execute <subcommand> blocks <begin> <end> <destination> <scan mode> [chainedCommand]
  • /execute <subcommand> entity <target> [chainedCommand]
  • /execute <subcommand> score <target> <objective> <operation> <source> <objective> [chainedCommand]
  • /execute <subcommand> score <target> <objective> matches <range> [chainedCommand]
  • /execute run <command>

In angular brackets — what must be written; in square brackets — optional. Words without brackets are written as-is.

Parameters

ParameterWhat to write
origingoal: username or selector @s, @p, @a, @r, @e
chainedCommandnext part of the command
dimensionone of: overworld, nether, the_end
positionx, y, z coordinates (can use ~ and ^)
yawnumber, can ~ — from current
pitchnumber, can ~ — from current
anchorone of: eyes, feet
axesword (name)
anchoredone of: eyes, feet
subcommandone of: if, unless
positionx, y, z coordinates (can use ~ and ^)
blockblock ID, for example stone (total 2648)
blockStatesblock state in square brackets
beginx, y, z coordinates (can use ~ and ^)
endx, y, z coordinates (can use ~ and ^)
destinationx, y, z coordinates (can use ~ and ^)
scan modeone of: masked, all
targetgoal: username or selector @s, @p, @a, @r, @e
objectivevalue from the world
operationcomparison: <, <=, =, >=, >
sourcegoal: username or selector @s, @p, @a, @r, @e
rangerange of numbers, for example 1..5
commandcommand

Who can

WhatValue
The command/execute
Who canoperator and command block
Cheats are requiredyes
Variants of recording18
In Java/execute

Frequently asked questions

What does /execute do in Bedrock?

Executes a command on behalf of one or more objects.

Why doesn't /execute work?

Commands require cheats: they are enabled in the world settings — after which achievements in this world are no longer awarded. This command can be executed by the world host or a command block.

How does /execute in Bedrock differ from Java?

Commands in Java include /execute, but they are written differently: each edition has its own parameters, names, and order. Java commands will not work as-is in Bedrock.

Commands nearby

Minecraft Bedrock 1.26.50.4 data: commands, parameters, and descriptions — from Mojang's official bedrock-samples repository.