/execute
公開 2026年8月31日・更新 2026年11月8日
- 書き方の数
- 14(1段目だけ)
- 必要な権限
- OP レベル 2(「チートの許可」がオンなら使える)
広告
どんなコマンド?
「誰として」「どこで」「どんな条件なら」を決めてから、別のコマンドを実行するコマンドです。たとえば全員の足元にブロックを置くなど、ほかのコマンドだけではできない動きを作れます。最後に run を書き、その後ろに実行したいコマンドを続けます。
使い方・ポイント
/execute at @a run setblock ~ ~-1 ~ minecraft:gold_block全員の足元のブロックを金ブロックにします。/execute as @e[type=minecraft:zombie] at @s run particle minecraft:heart ~ ~2 ~すべてのゾンビの頭の上にハートの粒子を出します。/execute if block ~ ~-1 ~ minecraft:diamond_block run say ダイヤの上に立っています足元がダイヤモンドブロックのときだけ発言します。/execute unless entity @e[type=minecraft:creeper,distance=..16] run say 近くにクリーパーはいません16ブロック以内にクリーパーがいないときだけ発言します。/execute in minecraft:the_nether run tp @s 0 100 0ネザーの 0,100,0 へテレポートします。/execute as @a at @s run tp @s ~ ~1 ~全員をそれぞれの位置から1ブロック上へ動かします。
書き方
/execute align …/execute anchored …/execute as …/execute at …/execute facing …/execute if …/execute in …/execute on …/execute positioned …/execute rotated …/execute run …/execute store …/execute summon …/execute unless …< > の中に書くもの
| 名前 | 書くもの |
|---|---|
<targets> | 対象(プレイヤーやエンティティ。@p・@a・@s など) |
<pos> | 座標(x y z) |
<biome> | 種類の名前かタグ |
<block> | ブロック(条件つき) |
<start> | 座標(x y z) |
<end> | 座標(x y z) |
<destination> | 座標(x y z) |
<source> | 座標(x y z) |
<path> | NBT の場所 |
<dimension> | ディメンション |
<entities> | 対象(プレイヤーやエンティティ。@p・@a・@s など) |
<name> | 関数 |
<item_predicate> | アイテム(条件つき) |
<target> | スコアを持つ相手 |
<targetObjective> | スコアの名前 |
<sourceObjective> | スコアの名前 |
<id> | 名前(ID) |
<rot> | 向き |
<scale> | 数 |
<objective> | スコアの名前 |
<entity> | 種類の名前 |
よくある質問
as と at の違いは何ですか?
as は「誰が実行するか」を変えます。at は「どこで実行するか」を変えます。
@s が自分以外を指すのはなぜ?
as の後では、@s は選ばれたエンティティ1体ずつを指します。
出典
- ゲームのデータ: Minecraft Java Edition 26.3 のコマンドの一覧(書き方・権限)
広告

