This is how the game itself shows it /help execute: in angle brackets - what to substitute, in square brackets - optional, through a line - one of.
On page 6 sections
Briefly
Examples are verified by the game - copy
-
Lightning Bolt at every player
/execute as @a at @s run summon minecraft:lightning_bolt -
Say if you're standing on the grass
/execute if block ~ ~-1 ~ minecraft:grass_block run say На траве -
Gold under the nearest player
/execute at @p run setblock ~ ~-1 ~ minecraft:gold_block
Rights - game master.
/execute run .../execute if (block|biome|loaded|dimension|score|blocks|entity|predicate|function|stopwatch|data|items|slots)/execute unless (block|biome|loaded|dimension|score|blocks|entity|predicate|function|stopwatch|data|items|slots)/execute as <targets> -> execute/execute at <targets> -> execute/execute store (result|success)/execute positioned (<pos>|as|over)/execute rotated (<rot>|as)/execute facing (entity|<pos>)/execute align <axes> -> execute/execute anchored <anchor> -> execute/execute in <dimension> -> execute/execute summon <entity> -> execute/execute on (owner|leasher|target|attacker|vehicle|controller|origin|passengers)
We need a game master level: Level 2 for the command unit, for the data pack functions and for the guests of the world open to the network with authorized commands. It's written in server consoles without a cross-section.
| What | Meaning |
|---|---|
| command | /execute |
| Rights | Playmaster (2) |
| Where is | on the server and in single player with cheats |
| Subcommands | align, anchored, as, at, facing, if, in, on, positioned, rotated, run, store, summon, unless |
How to use command / execute?
Syntax: /execute run .... For example, /execute as @a at @s run summon minor:lightning_bolt is the Lightning Bolt of each player.
What rights are needed for /execute?
We need a game master level: Level 2 for the command unit, for the data pack functions and for the guests of the world open to the network with authorized commands.
Does the command block work?
Yeah, the command unit's doing right-level 2 commands, and this one doesn't need any more. You don't have to write a line in the block.
- /compute
- /debug
- /fetchprofile
- /function
- /jfr
- /perf
- /random
- /return
- /schedule
- /scoreboard
- /stopwatch
- /test
According to Minecraft 26.3, the syntax is a clue to /help from the game itself, right from her command report, each example is checked by a review of the game's commands.