Minecraft Wiki
Advertisement
Book and Quill
このページは翻訳途中です。 
あなたが内容を翻訳してみませんか?
Clock JE3
この記事は内容の更新を必要とします。 
この記事を更新して、最近のアップデートや新たな情報を反映してください。

コマンドとは、定められた構文に従って書かれた高度な機能を持つテキストである。

使用方法

通常の Minecraftクライアントでは、Tキーを押すか直接/キーを入力してチャット画面を開いて入力する。/キーを使ってチャット画面を開いた場合は、コマンドの先頭のスラッシュが最初から入力された状態でチャット画面が開く。コマンドを入力中にTab ↹キーを押すと、使用可能なコマンドや変数が表示される。

コマンドはサーバーのコンソールで使用することもできる。その場合はコマンドにはスラッシュ記号が不要だ。

コマンドブロックから実行されるコマンドにスラッシュ記号をつけてもよいが、必須ではない。また、コマンドブロック内のコマンドは追加でオプションの変数を記述する必要がある場合がある。その変数には、一般的にはプレイヤー名などが当てはまる。

大多数のコマンドは、以下の状況でのみ有効である:

  • マルチプレイサーバーにて、管理者またはコマンドブロックによって実行された場合
  • その他のマルチプレイでは、「LANに開く」からチートを有効にしてローカルマルチプレイを開始した場合、または自分でサーバーをホスティングしている場合
  • シングルプレイで、ワールド生成時にチートを有効にした場合(「その他のワールドオプション」ボタンから設定する)

いくつかのコマンドは、シングルプレイにおいてチートが有効でなくとも実行できる。

注意: シングルプレイでワールドを作成時にチートを有効にしなかった場合でも、ローカルマルチプレイを開始する際にチートを有効にするとコマンドが使えるようになる(Esc → 「LANに開く」 → 「チートを許可する:オン」)。この際他のプレイヤーがゲームに参加する必要はない。ワールドを出るとコマンドは使えなくなるが、コマンドを使ってワールドに加えた変更はそのまま保持される。ワールドに入る度に同じ手順を繰り返せばよい。ローカルマルチプレイを開始するとゲームを一時停止できなくなるので注意。ワールドから出ればローカルマルチプレイは終了される。

チルダ表記法

多数のコマンドではチルダ~ 記号で「相対座標」を使うことができる。チルダ記号と一緒に書かれた数字は、コマンドで指定した座標からの「オフセット」であり、+-の符号で正負の方向を指定する。~ 一文字で ~0 を表す。

例えば、 tp 0 64 0 というコマンドではプレイヤーをx:0、y:64、z:0の位置へテレポートするが、tp ~3 ~ ~-3 というコマンドではプレイヤーをX方向へ「+3」(つまり東へ3ブロック分)、高さはそのまま、そしてZ方向へ「-3」(つまり北へ3ブロック分)テレポートさせる。

絶対座標は相対座標と一緒に使うことが出来る。例えば、tp ~ 64 ~ はX座標とZ座標はそのままに、Y座標:64へテレポートさせるコマンドである。

相対座標の原点はそれぞれのコマンドに依存する。例えば /tp コマンドの原点はテレポート開始時の座標である。その他のコマンドでは、原点はコマンドが実行された座標、またはコマンドで特別に指定した座標である。

ターゲットセレクター

大多数のコマンドでは、プレイヤー名でプレイヤーを指定する代わりに、条件を満たす一人もしくはそれ以上のプレイヤーを指定できる。条件でプレイヤーを指定する場合は、「ターゲットセレクター」の種類を選び、必要に応じて、満たされるべき条件を引数として追加できる。

例えば以下のコマンドでは、「Red」チームに所属する全てのプレイヤーのゲームモードをクリエイティブモードに変更する。各プレイヤー名を個別に指定するより効率的である。

/gamemode creative @a[team=Red]


ターゲットセレクターの種類

ターゲットセレクターの種類の概要
変数 働き
@p 最寄りのプレイヤー1人
@r ランダムなプレイヤー
@a 全てのプレイヤー
@e 全てのエンティティ

ターゲットセレクターの種類によって幅広い対象を識別する。変数は4種類ある:

@p
最も近い一人のプレイヤーが対象になる。 もしも複数のプレイヤーが正確に同じ距離に存在した場合は、サーバーに最近参加したプレイヤーが優先して選ばれる。
ターゲットセレクターの引数 を追記することで、対象となるプレイヤーをさらに絞り込める。例えば @p[team=Red] とすれば最も近い「Red」チームのプレイヤーを対象にする。さらに近くにプレイヤーが居たとしても、チームが違うならば対象にならない。
引数 c を使えば、対象になるプレイヤーの人数を増やすことが出来る(例えば @p[c=3] なら最寄りの3人のプレイヤーが対象になる)。c にマイナスの値を設定した場合は、対象を選ぶ優先順位が逆になる(例えば、@p[c=-1] だと最も遠いプレイヤーを対象にする)。
@r
ランダムなプレイヤーを対象にする(type引数を使えばランダムなエンティティも対象になる)。
ターゲットセレクターの引数 を使って、対象となるプレイヤーを絞り込むことが出来る。 例えば、@r[team=Red] は「Red」チームのプレイヤーの中からランダムで一人を対象にする。
c 引数を使えば対象になるプレイヤーの人数を増やせる。例えば、@r[c=3] はランダムに3人のプレイヤーを対象にする。
type 引数を使わない場合は、@r は常時プレイヤーを対象とする。 type 引数を使えばプレイヤー以外のエンティティを対象にできる(例えば、@r[type=Zombie] はランダムなゾンビを対象にする。@r[type=!Player] はプレイヤー以外のエンティティをランダムで対象にする。@r[type=!Zombie] はゾンビ以外からランダムで対象にする)。
@a
死んだプレイヤーも含めて、全てのプレイヤーを対象にする。これ以外に死んだプレイヤーを対象にするセレクターはない。
ターゲットセレクターの引数 を使って、対象にするプレイヤーを絞り込むことができる。例えば、@a[team=Red] は「Red」チーム内の全プレイヤーを対象にする。
@e
全てのエンティティを対象にする(プレイヤーも含める)。
ターゲットセレクターの引数 を使って、対象にするエンティティを絞り込むことが出来る。 例えば、@e[type=Cow]ウシだけを対象にする。


ターゲットセレクターの引数

この節の内容は翻訳されていません。 
あなたが内容を翻訳してみませんか?
ターゲットセレクターの引数の概要
引数 選択基準
x, y, z 座標
r, rm 半径(最大、最小)
m ゲームモード
c
l, lm 経験値レベル(最大、最小)
score_name 最大スコア
score_name_min 最小スコア
team チーム名
name エンティティ名
dx, dy, dz 範囲の大きさ
rx, rxm x軸を中心とした向き(最大、最小)
ry, rym y軸を中心とした向き (最大、最小)
type エンティティの種類

ターゲットセレクターの後に引数を追記することで、選択基準をさらに編集することが出来る。 @a または @e セレクターと一緒に使えば、全ての中から特定の限られた対象に絞り込むことが出来る。@p または @r セレクターと一緒に使えば、最寄りのまたはランダムに選ばれた対象の中からさらに絞り込むことが出来る。

引数はセレクターの後に四角括弧を追記し、その中にコンマで区切って値を書く。:

@<セレクター>[<引数>=<>,<引数>=<>,…].

括弧の中のスペースは無効であり、引数の値を区切るにはコンマだけが有効である。

引数では大文字と小文字は区別され、未知の引数を書いた場合は無視される。例えば、 kill @e[type=Creeper,r=20] は半径20ブロック以内の全てのクリーパーを抹消するが、 kill @e[Type=Creeper,r=20] ('type'内の'T'が大文字)と書くとクリーパーだけを指定するはずの'type'の書き方が間違っているため、半径20ブロック以内の全てのエンティティがキルされる。

xyzr の4つの引数は、最初に書く場合は単純に数値だけを書いて指定できる。したがって、以下の2つのコマンドは同じ意味である:

/gamemode creative @a[x=10,y=20,z=30,r=4]
/gamemode creative @a[10,20,30,4]
座標で対象を絞り込む
[x=X,y=Y,z=Z] — 指定した座標のターゲットを対象にする。合わせて半径も指定することで、指定した座標の周囲を対象にできる。
座標の値は正確な整数である必要がある - チルダ表記法 はこの引数では使えない。
半径で対象を絞り込む
[r=R] — コマンドが実行された座標を中心に、半径Rブロック以内を対象とする。
[rm=RM] — コマンドが実行された座標を中心に、半径RMブロック以上を対象とする。
合わせて座標の引数を使った場合は、コマンドを実行した場所よりも引数で指定した座標が優先される。 非常に遠い座標と非常に大きい半径を指定すれば、直線に近い範囲を対象にすることができる。
ゲームモードで絞り込む
[m=M] — 指定されたゲームモードの人だけを対象にする。
[m=!M] — 指定されたゲームモード以外の人を対象にする。
'M'に入る許可された値は以下のとおりである:
  • -1: 全てのゲームモード
  • 0ssurvival: サバイバルモード
  • 1ccreative: クリエイティブモード
  • 2aadventure: アドベンチャーモード
  • 3spspectator: スペクテイターモード
数で絞り込む
[c=C] — 指定された数のターゲットを対象とする。 コマンドが実行された場所からの距離の順に選ばれる。
@p または @r セレクターでは、このc引数の値はデフォルトで1である。よってc引数を使うことで対象となるターゲットの数を増加させることができる。@a または @e セレクターと合わせて使えば、最寄りのターゲットを対象にできる。
もし同じ距離に複数のターゲットが存在した場合は、サーバーに存在した時間(最近のゲーム参加またはエンティティが作成されてからの時間)を基準に対象が選ばれる。最も時間が長いターゲットが優先して選ばれる。 例えば 同じ距離に存在した場合, @a[c=1] は最も長くサーバーに存在したターゲット一つを対象にし、 @e[type=Creeper,c=3] は3体の存在した時間が長いクリーパーが対象になる。
マイナスの値を指定した場合は、対象となる順番が反転する。 例えば、@p[c=-3] は3つの最も遠いプレイヤーを対象にする。もし対象にされうるターゲットが全て同じ距離に存在した場合は、@e[c=-3] は3つの最近参加した/作成されたターゲットが対象になる。
経験値レベルで絞り込む
[l=L] — レベルがL以上ではない全てのターゲットを対象にする。
[lm=LM] – レベルがLM未満ではない全てのターゲットを対象にする。
スコアの値で絞り込む
[score_スコア名=数値]スコア名数値以上でない全てのターゲットを対象にする。
[score_スコア名_min=最小値]スコア名最小値未満でない全てのターゲットを対象にする。
例えば、@a[score_points_min=30,score_points=39]pointsというスコアの値が30以上39以下のターゲットを対象にする(包括的に)。
チームで絞り込む
[team=TEAM]TEAMというチームに所属するターゲットを対象にする。
[team=!TEAM]TEAMというチームに所属しないターゲットを対象にする。
[team=] — どのチームにも所属していないターゲットを対象にする。
名前で絞り込む
[name=NAME]NAMEという名前のターゲットを対象にする。
[name=!NAME]NAMEという名前ではないターゲットを対象にする。
範囲で絞り込む
[dx=DX,dy=DY,dz=DZ]
コマンドが実行された座標、 またはコマンド内で指定された座標を中心とした特定の範囲のターゲットを対象にする。DXは"x"方向(すなわち東/西)、 DYは"y"方向(すなわち上/下)、DZは"z" 方向(すなわち北/南)の範囲を意味している。一緒に xyz の引数を指定した場合は、コマンドが実行された座標よりそれらを優先して範囲の北西の角とする (dxdydz は中心からの距離を示すものであり、別々の座標を指定するものではない)。
もし半径の引数と合わせて使った場合は、半径と範囲が重なった部分だけを対象とする(範囲の北西の角からの半径を指定でき、範囲の外は対象にならない)。
Selecting targets by vertical rotation
[rx=RX] — Selects only targets with a maximum vertical rotation of RX.
[rxm=RXM] — Selects only targets with a minimum vertical rotation of RXM.
Vertical rotation values vary from -90.0 facing straight up to 90.0 facing straight down (thus vertical rotation values increase with rotation downwards).
Selecting targets by horizontal rotation
[ry=RY] — Selects only targets with a maximum horizontal rotation of RY.
[rym=RYM] — Selects only targets with a minimum horizontal rotation of RYM.
Horizontal rotation values vary from -180.0 (facing due north), to -90.0 (facing due east), to 0.0 (facing due south), to 90.0 (facing due west), to 179.9 (just west of due north) before wrapping back to -180.0 (thus horizontal rotation values increase with rotation to the right, or clockwise viewed from above).
Selecting targets by type
[type=TYPE] — Selects only targets of the specific entity type.
[type=!TYPE] — Selects only targets not of the specific entity type.
TYPE must be an entity ID used to identify different types of entities internally (for example, Creeper for creepers, MinecartRideable for regular minecarts, PrimedTnt for primed TNT, etc.). Entity IDs are case-sensitive and invalid entity IDs will cause the command to fail.
When used with @r, can change its normal behavior of targeting only players to target other entities.

データタグ

この節の内容は翻訳されていません。 
あなたが内容を翻訳してみませんか?

A data tag is a sequence of text which describes a data structure using attribute-value pairs. Data tags are used in commands to specify complex data for players, entities, and some blocks.

A data tag consists of zero or more attribute-value pairs separated by commas and delineated by curly brackets. Each attribute-value pair consists of an attribute name and the attribute's value, separated by a colon. Some values, however, may themselves contain attribute-value pairs, allowing a data tag to describe a hierarchical data structure.

Example: {name1:123,name2:"sometext",name3:{subname1:456,subname2:789}}

The data structures that data tags describe are the same ones used in Minecraft's save files. These data structures are described in other articles and commands expect data tags to use the same attribute names (which are case-sensitive):

Data Structure Specification Links
Objects Examples
Block entities chests, furnaces, command blocks, mob spawners, signs, etc.
Items items in inventories (includes specifications for enchantments, lore, custom names, etc.)
Item entities items on the ground
Mobs creepers, cows, villagers, etc.
Projectiles arrows, fireballs, thrown potions, etc.
Vehicles boats, minecarts, etc.
Dynamic tiles primed TNT, falling sand/gravel
Other entities firework rockets, paintings, and item frames

The defined data structures also expect the values to be of the correct type.

Data Tags Value Types
Type Description
 Byte An integer between -128 and 127 (inclusive).
 Short An integer between -32,768 and 32,767 (inclusive).
 Int An integer between -2,147,483,648 and 2,147,483,647 (inclusive).
 Long An integer between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807 (inclusive).
 Float
 Double
Numbers which can have a decimal portion (for example, 3.14159).
 String A sequence of text, optionally delineated with double quotes.

Double quotes must be used if the String contains commas, curly brackets, or square brackets. To include a double quote inside a String, add a backslash before the double quote.

Example: "Call me \"Ishmael\""
 List A sequence of values, separated by commas and delineated with square brackets. The values must be of the same type, which is dictated by the first value in the sequence.
Example: [3.2,64.5,129.5]
 Int Array A sequence of integers between -2,147,483,648 and 2,147,483,647 (inclusive), separated by commas and delineated with square brackets.
 Compound A sequence of attribute-value pairs, separated by commas and delineated with curly brackets.
Example: {X:3,Y:64,Z:129}

Every data tag argument is itself a Compound.

The  Byte Array type is unavailable to commands.

Some commands may require that a number's type be specified by adding a letter (B, S, L, F, D) to the end of the value. For example, 3s for a short, 3.2f for a float, etc. (This doesn't work with I for int.) The letter can be uppercase or lowercase. When no letter is used and Minecraft can't tell the type from context, it assumes double (if there's a decimal point), int (if there's no decimal point and the number is small enough to store as an int), or string (if neither is true). A square-bracketed literal is assumed to be an int array if every element that's between commas is an int; otherwise, it is assumed to be a list. An exception applies: [] is an empty list, but [,] is an empty int array.

When commands such as /testfor, /testforblock, and /clear are used to match data tags, they only check for the presence of the provided tags in the target entity/block/item. This means that the entity/block/item may have additional tags and will still match. This is true even for lists and arrays: the order of a list is not acknowledged, and as long as every requested element is in the list, it will match even if there are additional elements.

The format used for data tags is a lenient form of JSON.

JSONテキスト

この節の内容は翻訳されていません。 
あなたが内容を翻訳してみませんか?

The /tellraw and /title commands use strict JSON syntax.

Scores and target selectors are evaluated for a Sign when it is placed or edited and for a Written Book when it is "resolved" (opened for the first time after signing). They won't update after that, and they won't work if edited onto an existing sign with an NBT editor, or onto a book that's already marked resolved. There's no way to wrap text onto the next line of a sign or the next page of a book during resolution; instead, the extra text will simply disappear.

The format of raw JSON text is a JSON Object which supports the following (mostly optional) elements:

  • The base chat component Object
    •  text: A string representing raw text to display directly in chat. Note that selectors such as "@a" and "@p" are not translated into player names; use selector instead. "\n" is newline (enter).
    •  extra: A list of additional objects, sharing the same format as the base object.
      • A list element with the same format as the base object (recursive). Note that all properties of this object are inherited by children except for text, extra, translate, with, and score. This means that children will retain the same formatting and events as this object unless they explicitly override them.
    •  color: The color to render this text in. Valid values are "black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", "white", and "reset" (cancels out the effects of colors used by parent objects). Technically, "bold", "underline", "italic", "strikethrough", and "obfuscated" are also accepted, but it may be better practice to use the tags below for such formats.
    •  bold: Boolean (true/false) - whether to render text in bold. Defaults to false.
    •  underlined: Boolean (true/false) - whether to render text underlined. Defaults to false.
    •  italic: Boolean (true/false) - whether to render text in italics. Defaults to false.
    •  strikethrough: Boolean (true/false) - whether to render text with a strikethrough. Defaults to false.
    •  obfuscated: Boolean (true/false) - whether to render text obfuscated. Defaults to false.
    •  insertion: When the text is shift-clicked by a player, this string will be inserted in their chat input. It will not overwrite any existing text the player was writing.
    •  clickEvent: Allows for events to occur when the player clicks on text.
      •  action: The action to perform when clicked. Valid values are "open_url" (opens value as a URL in the player's default web browser), "open_file" (opens the value file on the users computer), "twitch_user_info" (opens info about a twitch user), "run_command" (has value entered in chat as though the player typed it themselves. This can be used to run commands, but the command will fail if the player does not have the required permissions to use it), "change_page" (can only be used in written books) changes to page value if that page exists, and "suggest_command" (similar to "run_command", but the text only appears in the player's chat input, and is not automatically entered. Unlike insertion, this will replace the existing contents of the chat input). "open_file" and "twitch_user_info" cannot be used with commands.
      •  value: The URL, file, twitch user, chat, command or book page used by the specified action. Note that commands must be prefixed with the usual "/" slash.
    •  hoverEvent: Allows for a tooltip to be displayed when the player hovers their mouse over text.
      •  action: The type of tooltip to show. Valid values are "show_text" (shows raw JSON text), "show_item" (shows the tooltip of an item which can have NBT tags), "show_achievement" (shows formatted text describing an achievement or statistic. Normal achievement names are green, final achievement names are dark_purple, and statistic names are gray. In addition, a description is given for achievements), and "show_entity" (shows an entity's name, possibly its type, and its UUID).
      •  value: The formatting of this tag varies depending on the action. Note that "show_text" is the only action to support an Object as the value; all other action values are Strings and should thus be wrapped in quotes.
        • "show_text": Can be either a raw String of text, or an Object with the same formatting as this base object. Note that clickEvent and hoverEvent do not function within the tooltip, but the formatting and extra tags still work.
        • "show_item": A string formatted like item NBT data. Contains the "id" tag, and optionally the "Damage" tag and "tag" tag (which is the same compound used as "dataTag" in the /give command).
        • "show_achievement": The achievement or statistic's name. This uses the same format as achievement and statistic Scoreboard objective criteria and the /achievement command.
        • "show_entity": A string formatted like a compound with the string values "type" (such as "Zombie"), "name", and "id" (should be an entity UUID, but can actually be any string).
    •  translate: The translation identifier of text to be displayed using the player's selected language. This identifier is the same as the identifiers found in lang files from assets or resource packs. The translated text will only be displayed if the text string is not used.
    •  with: A list of chat component arguments and/or string arguments to be used by translate.
      • The arguments are text corresponding to the arguments used by the translation string in the current language, in order (for example, the first list element corresponds to "%1$s" in a translation string).
    •  score: A player's score in an objective. Displays nothing if the player is not tracked in the given objective. Ignored completely if text or translate is present.
      •  name: The name of the player whose score should be displayed. Selectors (such as @p) can be used, in addition to "fake" player names created by the scoreboard system. In addition, if the name is "*", it will show the reader's own score (for example, /tellraw @a {score:{name:"*",objective:"obj"}} will show every online player their own score in the "obj" objective). Note that non-player entity scores (such as @e[type=Cow]) do not show, even if the entity has been given a score in the objective.
      •  objective: The internal name of the objective to display the player's score in.
      •  value: Optional. If present, this value is used regardless of what the score would have been.
    •  selector: A string containing a selector (@p,@a,@r, or @e) and, optionally, selector arguments. Unlike text, the selector will be translated into the correct player/entity names. If more than one player/entity is detected by the selector, it will be displayed in a form such as 'Name1 and Name2' or 'Name1, Name2, Name3, and Name4'. Ignored completely if text, translate, or score is present. Clicking a player's name inserted into a /tellraw command this way will suggest a command to whisper to that player. Shift-clicking a player's name will insert that name into chat. Shift-clicking a non-player entity's name will insert its UUID into chat.

Due to the extra tag, the above format may be recursively nested to produce very complex and functional text strings. However, a raw json text doesn't have to be complicated at all: virtually all properties are optional and may be left out.

To be valid, each object must have at least either text, translate, score or selector (everything else is optional). As a matter of shorthand, however, the entire Object may be substituted with a String. In this case, that string will be considered the value of the text property. For example, "This is raw text" is equivalent to {text:"This is raw text"}. This shorthand substitution is valid anywhere a raw text object is required (including the base <raw json message> argument of /tellraw, the elements of the extra list, and the value of a "show_text" hover_event).

/tellraw also accepts an array of objects and/or strings; they are concatenated. It even accepts a tree of nested arrays; they are traversed depth-first. For example:

/tellraw @a ["Hello there, ",{selector:"@p"},"."]
/tellraw @a [[[["The "],[["quick ","brown "],[{selector:"@p"}," jumps "],"over "],"the "],["lazy ","dog."]]]

Finally, unlike other commands using JSON, /tellraw Strings support Unicode via the notation \u####, where #### is the Unicode hexadecimal number for the desired character.

External links
Skylinerw's JSON Formatting Examples
Tellraw Generator

各コマンドの概要

以下の表は、各コマンドの概要を示している。行ごとに並べ替え出来る。

各コマンドの概要
コマンド 説明 管理者のみ マルチプレイ限定 ブロック エンティティ プレイヤー ワールド
/achievement プレイヤーに実績を与えたり削除したりする。 管理者限定 プレイヤー
/ban BAN一覧にプレイヤーを追加する。 管理者限定 マルチ限定 プレイヤー
/ban-ip BAN一覧にIPアドレスを追加する。 管理者限定 マルチ限定 プレイヤー
/banlist BAN一覧を表示する。 管理者限定 マルチ限定 プレイヤー
/blockdata ブロックのデータタグを編集する。 管理者限定 ブロック
/clear プレイヤーのインベントリからアイテムを消去する。 管理者限定 プレイヤー
/clone ブロックのまとまりをコピー/移動させる。 管理者限定 ブロック
/debug デバッグを開始/停止する。 管理者限定
/defaultgamemode デフォルトのゲームモードを設定する。 管理者限定 ワールド
/deop プレイヤーの管理者権限を削除する。 管理者限定 マルチ限定 プレイヤー
/difficulty 難易度を設定する。 管理者限定 プレイヤー
/effect ステータス効果を付与/削除する。 管理者限定 エンティティ プレイヤー
/enchant プレイヤーのアイテムをエンチャントする。 管理者限定 プレイヤー
/entitydata エンティティのデータタグを編集する。 管理者限定 エンティティ
/execute プレイヤー/エンティティにコマンドを実行させる。 管理者限定
/fill ブロックを一括で設置する。 管理者限定 ブロック
/gamemode プレイヤーのゲームモードを設定する。 管理者限定 プレイヤー
/gamerule ゲームルールを設定する。 管理者限定 ワールド
/give プレイヤーにアイテムを与える。 管理者限定 プレイヤー
/help コマンドのヘルプを表示する。
/kick プレイヤーをキックする。 管理者限定 マルチ限定 プレイヤー
/kill エンティティをキル(抹消)する。 管理者限定 エンティティ プレイヤー
/list サーバーのプレイヤー一覧を表示する。 管理者限定 マルチ限定 プレイヤー
/me 自分自身に関するメッセージを表示する。 プレイヤー
/op プレイヤーに管理者権限を与える。 管理者限定 マルチ限定 プレイヤー
/pardon BAN一覧から項目を削除する。 管理者限定 マルチ限定 プレイヤー
/particle パーティクルを表示する。 管理者限定 プレイヤー
/playsound サウンドを再生する。 管理者限定 プレイヤー
/publish ワールドをローカルのネットワークに開放する。 管理者限定 ワールド
/replaceitem インベントリのアイテムを置き換える。 管理者限定 ブロック エンティティ プレイヤー
/save-all サーバーのワールドをセーブする。 管理者限定 マルチ限定 ワールド
/save-off サーバーの自動セーブを無効にする。 管理者限定 マルチ限定 ワールド
/save-on サーバーの自動セーブを有効にする。 管理者限定 マルチ限定 ワールド
/say 複数のプレイヤーにメッセージを表示する。 管理者限定
/scoreboard オブジェクト、プレイヤー、チーム、タグを管理する。 管理者限定 エンティティ プレイヤー
/seed シード値を表示する。 管理者限定 ワールド
/setblock ブロックを設置/置換する。 管理者限定 ブロック
/setidletimeout アイドル状態のプレイヤーがキックされる時間を設定する。 管理者限定 マルチ限定 プレイヤー
/setworldspawn ワールドのスポーン地点を設定する。 管理者限定 ワールド
/spawnpoint プレイヤーのスポーン地点を設定する。 管理者限定 プレイヤー
/spreadplayers エンティティをランダムな場所に配置する。 管理者限定 エンティティ プレイヤー
/stats コマンドの結果を使ってオブジェクトを更新する。 管理者限定 ブロック エンティティ プレイヤー
/stop サーバーを停止する。 管理者限定 マルチ限定 ワールド
/summon エンティティを召喚する。 管理者限定 エンティティ
/tell 他のプレイヤーにプライベートメッセージを送信する。 プレイヤー
/tellraw プレイヤーにJSONテキストを表示する。 管理者限定 プレイヤー
/testfor 条件に合うエンティティを検知する。 管理者限定 エンティティ プレイヤー
/testforblock 特定の位置に指定したブロックがあるかどうか判定する。 管理者限定 ブロック
/testforblocks 2つのブロックのまとまりが一致するか判定する。 管理者限定 ブロック
/time ワールドの時間の数値を変更する。 管理者限定 ワールド
/title 画面に表示するタイトルを管理する。 管理者限定 プレイヤー
/toggledownfall 天候を交互に切り替える。 管理者限定 ワールド
/tp エンティティをテレポートさせる。 管理者限定 エンティティ プレイヤー
/trigger trigger型オブジェクトを使用する。 プレイヤー
/weather 天候を設定する。 管理者限定 ワールド
/whitelist サーバーのホワイトリストを設定する。 管理者限定 マルチ限定 プレイヤー
/worldborder World Borderを管理する。 管理者限定 ワールド
/xp プレイヤーの経験値を追加/削除する。 管理者限定 プレイヤー


コマンド一覧

以下の表で、必要な引数は <不等号> で囲われ、任意のものは [大括弧] で括られている。斜体 の引数は適切な値に置き換える必要があり、通常の文字はそのまま入力される必要がある。

プレイヤーのコマンド

サーバーに接続が許されているプレイヤー全員、またシングルプレイでチートが無効であっても用いることが出来るコマンド。

コマンド 説明 成功条件[備考 1]
me <アクション文字列> /emote/action のように、IRCクライアントの /me コマンドと同じもので、他のプレイヤーに物語のメッセージを「* あなたの名前 アクション文字列」の形で送る(例: 「* Notch sneezes.」や「* Notch exploded.」など)[要検証]。もし複数プレイヤーを示す目標選択子(つまり @a)が アクション文字列 で用いられると、名前の一覧が2人の場合は「名前1 and 名前2」、3人の場合「名前1, 名前2, and 名前3」のようになる。ゆえに アクション文字列 にどのような選択子が用いられようと、このコマンドの出力は1回のみになる。 アクション文字列 内の 全ての 目標選択子 (つまり @p) が評価される必要がある。
help [ページ番号 | コマンド名] コマンドの一覧を表示するか、コマンド名の詳細を表示する。備考: マルチプレイ専用とされるコマンドはシングルプレイゲームでは表示されない。たとえLANに向け公開(LAN内マルチプレイ)されていたとしても、である。 ページ番号 に正当な値が指定されるか、ページ番号やコマンド名が指定されていない場合に成功となる。コマンド名 が指定されたときは返値は「失敗」となるが、当該コマンドの使用法は表示される。
? [ページ番号 | コマンド名]
tell <プレイヤー名> <メッセージ> サーバー上にいる指定したプレイヤーにプライベートメッセージを送信する。PvP(プレイヤー対戦)サーバーでは他のプレイヤーには秘密にしつつ何かを頼みたいときに便利である。もし複数プレイヤーを示す目標選択子(つまり @a)が メッセージ で用いられると、名前の一覧が2人の場合は「名前1 and 名前2」、3人の場合「名前1, 名前2, and 名前3」のようになる。ゆえに メッセージ にどのような選択子が用いられようと、このコマンドの出力は1回のみになる。しかし プレイヤー名 に選択子が用いられると複数のプレイヤーへとメッセージを送信できる。 メッセージ 内の 全ての 目標選択子(つまり @p)が評価され、かつ プレイヤー名 のプレイヤーがオンラインである場合。
  1. コマンドの「成功条件」とは、コマンドの実行が「成功した」と看做される為に必要なものである。様々なものの決定、例えばコマンドブロックからコンパレーターで信号を引き出したものなどに用いられる。全てのコマンドの「成功」が何かを実行する、あるいは全てのコマンドの「失敗」が目的が達成できなかったことを意味するわけではないので注意してほしい。

オペレーター限定コマンド

マルチプレイで、op(英:Operator; オペレーター)がサーバーのコンソールだけでなく、チャットウィンドウで用いることが出来るものである。チャットウィンドウではスラッシュ記号をコマンド名の前に付ける。シングルプレイでは、チートが有効になったワールドか、自身がホスト(公開)しているワールドで使用可能である。

注意: Opコマンドは他のオンライン上のオペレーターにも通知される。

コマンド 説明 成功条件
clear <プレイヤー名> [アイテム] [メタデータ] プレイヤー名 の持ち物全てか、アイテム:メタデータ で指定されたアイテムを削除する。 プレイヤー名 のプレイヤーがオンラインで、かつ1つ以上のアイテムの削除が行われた場合。
debug <start | stop> 新しいデバッグプロファイリングのセッションを開始するか、今実行中のセッションを停止する。コンソールにパフォーマンスへの影響がある旨の注意書きが表示され、停止すると debug フォルダーにプロファイラーの結果ファイルが作成される。 セッションが実行中で無ければ停止できない。コマンドブロックでは使用不可。
defaultgamemode <survival | creative | adventure> ワールド選択時のデフォルトのゲームモードを指定する。ワールドに参加しようとする新たなプレイヤーはそのゲームモードでの参加となる。ゲームモード名の短縮形として「s/c/a」の一文字か、「0/1/2」の番号がそれぞれ指定可能である。このコマンドはハードコアモードでは機能しない。 ゲームモードが正しい値である場合。
difficulty <peaceful | easy | normal | hard> 難易度を変更する。難易度は順に、p/e/n/h、0/1/2/3 という形で簡略表記できる。 難易度として正しい値である場合。
effect <プレイヤー名> <効果> [秒数] [増幅度] 指定されたプレイヤーに指定されたステータス効果を指定された秒数(デフォルトでは30秒)、与える。効果時間は1,000,000秒までに制限され、増幅度 は最大255までとなる。効果のID番号はステータス効果のページを参照。秒数 に0を指定することでその効果を削除する。If you put the amplifier to a number of a variably high value, it will not give the desired amplifier 効果を削除する場合、その効果を既に受けている必要がある。効果 が正しい値で、プレイヤー名 のプレイヤーがオンラインである場合。
enchant <プレイヤー名> <エンチャントID> [エンチャントレベル] そのプレイヤーが手にしているアイテムにIDで指定される番号のエンチャントを付与する。アイテムのエンチャのとの通常の制限内でのみ機能することに注意。指定されたエンチャントを通常付与可能なアイテムにのみ、このコマンドでもエンチャントを与えられる。レベルも選択されたエンチャントの通常存在する最大のレベル以上のものを与えることはできない。通常拒否されるような、重複、または強化させすぎな組み合わせは、このコマンドでも拒否される。 エンチャントID が正当な値で、レベルが正しい範囲内の値で、持っているアイテムがこのエンチャントを受け入れ可能であり、相容れないエンチャントが持っているアイテムに既に存在しておらず、プレイヤー名 で指定されるプレイヤーがオンラインの場合。
gamemode <survival | creative | adventure> [プレイヤー名] プレイヤー名のゲームモードを変更する。ゲームモード名の短縮形として「s/c/a」の一文字か、「0/1/2」の番号がそれぞれ指定可能である。プレイヤー名が省略されると自身のゲームモードを変更する。特定のプレイヤーのみを変更し、その他のプレイヤーは変えないので忘れないように。 ゲームモード名が正しく、プレイヤー名 のプレイヤーがオンラインの場合。コマンドブロックでは プレイヤー名 は必須なので注意が要る。
gamerule <ルール名> [true | false] ルール名で指定されるものを切り替える。trueなら有効、falseなら無効。true/falseの指定が無い場合は現在の状態を表示する。ルール名に指定可能なものは次の通り。
  • commandBlockOutput - コマンドブロックがコマンドを実行した際に管理者に通知するか否か[要検証]
  • doFireTick - 延焼するか否か。
  • doMobLoot - Mobがアイテムをドロップするか否か。
  • doMobSpawning - Mobが自然発生(スポーン)するか否か。
  • doTileDrops - ブロックからのドロップがあるか否か。
  • keepInventory - プレイヤーの死亡時に持ち物を維持するか否か。
  • mobGriefing - クリーパー、エンダーマン、ガスト、ウィザーによるブロックの変更を可能にするか否か。またゾンビ、スケルトン、ゾンビピッグマンがアイテムを拾うことが出来るようになるか否か。
  • naturalRegeneration - 満腹度が一定の水準以上にある場合にプレイヤーの体力が自然回復するか否か。
  • doDaylightCycle - 昼夜サイクルの推移が行われるか否か。
常に成功する。ルール名 に未知の文字列を指定しようと、true/false 以外の状態を指定しても、である。
give <プレイヤー名> <アイテム> [] [メタデータ] アイテムメタデータ で指定されるアイテムを、 (省略時は 1)個、プレイヤー名 の場所に出現させる。例えば /give John 5 30 1 とすることで、プレイヤー名が「John」へと30個の松の木材を与える。 アイテム が正当なIDであり、 が1から64の範囲内で、かつ プレイヤー名 のプレイヤーがオンラインの場合。
kill ユーザーに無限のダメージを与え、殺す。迷ったり、閉じ込められたりした際、あるいは体力や満腹度の回復として有用である(アイテムを取り戻しやすいと仮定して)。同時に次のメッセージが表示される: "Ouch. That looked like it hurt."[要検証] コマンドブロックでは使用不可。
publish シングルプレイ限定。今プレイしているシングルプレイのワールドをLAN内に公開し、他のプレイヤーが参加できるようにする。 コマンドブロックでは使用不可。
say <メッセージ> メッセージ を、サーバー上の全てのプレイヤーに一斉送信する。もし複数プレイヤーを示す目標選択子(つまり @a)が メッセージ で用いられると、名前の一覧が2人の場合は「名前1 and 名前2」、3人の場合「名前1, 名前2, and 名前3」のようになる。ゆえに メッセージ列 にどのような選択子が用いられようと、このコマンドの出力は1回のみになる。 メッセージ 内の 全ての 目標選択子(つまり @p)が評価される必要がある。
scoreboard <objectives|players|teams> 詳細についてはスコアボードを参照。スコアボード限定コマンド一覧。 スコアボード限定コマンドを参照。
seed ワールドのシード値を表示する。シングルプレイでは、このコマンドはチートの有効無効によらず常に使用可能である。 常に成功する(コマンドブロックで、シングルプレイのプレイヤーにより、サーバーのオペレーターにより、の何れでも)。
spawnpoint <プレイヤー名> [x y z] 指定したプレイヤーのリスポーン地点を指定した座標にする。座標を指定しなければ現在の場所に設定する。座標 x y z が指定されない場合、プレイヤー名 も省略でき、現在の場所にコマンドを発行したプレイヤーのリスポーン地点を設定する。リスポーン座標は完全な値である必要がある。少数であってはならない。 プレイヤー名 のプレイヤーがオンラインで、xyz 座標が-30,000,000 から 30,000,000の範囲内(端を含む)の場合。
time set <数値 | day | night> ワールドの時間を設定する。数値 は0以上の数字で、0は日の出、6,000が正午、12,000が日没、18,000が真夜中になる。数値 は24,000を超えた値の場合、単純に24,000で割った余りと同じ扱いになる。「time set day」で時間を0に、「time set night」で12500に設定する。 数値 が0以上か、day、night というキーワードが指定されている場合。
time add <数値> ワールドの時間を、前述のように進める。 数値 が0か正の値の場合。
toggledownfall 降雨・降雪をトグル切り替えする。 常に成功する。
tp [プレイヤー名] <目標プレイヤー名> プレイヤー名 で指定したプレイヤーを 目標プレイヤー名 で指定したプレイヤーのいる場所へとテレポートさせる。プレイヤー名が一人だけなら、自身をテレポートさせる。 コマンドブロックでは プレイヤー名 は必須になる。両プレイヤーがオンラインである必要がある。
tp [プレイヤー名] <x> <y> <z> プレイヤー名 で指定したプレイヤー(未指定なら自分)をx, y, zで指定した座標へとテレポートさせる(y座標は0または正の値のみ)。座標の値の前に~を付けることで現在の場所からの相対値を指定できる。例えば「/tp John ~3 64 ~3」とすると、Johnというプレイヤーを南東へ3ブロック、Y座標は64に移動させる。 xz 座標が-30,000,000 から 30,000,000の範囲の内側(端は含まない)で、y が0以上の場合。コマンドブロックでは プレイヤー名 は必須で、そのプレイヤーがオンラインである必要がある。
weather <clear | rain | thunder> [秒数] 天候を晴れ(clear)、雨(rain)、雷雨(thunder)へと、指定された時間、一時的に変更する。寒冷バイオームでは雨ではなく雪が降る。 秒数 が1から100,000までで、天候名のキーワードが正しい場合。
xp <> [プレイヤー名] 指定した プレイヤー名 に経験値オーブを指定した点数与える。 に負の値を指定することは出来ない(この書式で経験レベルを奪うことは出来ない)。 は2,147,483,647までの数値である場合。またコマンドブロックでは プレイヤー名 は必須で、そのプレイヤーがオンラインである必要がある。
xp <>L [プレイヤー名] 指定した プレイヤー名 で指定した経験のレベルを与える。数字の最大は2,147,483,647になり、プレイヤーの経験レベルがこれを越えると0になる。負の値を指定することで、経験レベルを剥奪することが可能。 が-2,147,483,648以上2,147,483,647以下の場合。コマンドブロックでは プレイヤー名 は必須で、そのプレイヤーがオンラインである必要がある。

マルチプレイ限定コマンド

これらコマンドはop(オペレーター)がサーバーコンソールから、あるいはコマンド文字(スラッシュ記号)を頭に付けることでチャット画面から用いることが出来る。これらはマルチプレイでのみ利用可能である。list コマンド以外のものはコマンドブロックでは実行することは出来ず、目標選択子は使用できない。多くのコマンドがサーバー上に居たことがないプレイヤーに対して、あるいは Minecraft アカウントとして登録されていない(出来ない)名前が使用可能である。

コマンド 説明 成功条件
ban <プレイヤー名> [理由] サーバーのブラックリストに プレイヤー名 の名前を登録し、サーバーに接続できないようにする。注意: ブラックリストはホワイトリストよりも優先される[要検証] 常に成功する。
ban-ip <IPアドレス|プレイヤー名> IPアドレス[要検証]をブラックリストに登録し、以降接続を拒否する。 IPアドレス が正しいもの、あるいは プレイヤー名 のプレイヤーがオンラインである場合。
banlist [ips] ブラックリストに登録されている一覧を表示する。IPアドレスとして登録されているものを表示するには、「banlist ips」とする。 常に成功する。
deop <プレイヤー名> 指定されたプレイヤーのオペレーター権限を取り消す。 常に成功する。
kick <プレイヤー名> [理由] サーバーと プレイヤー名 で指定したプレイヤーを強制的に切断し、理由 を相手方に通知する。 プレイヤー名 のプレイヤーがオンラインである場合。
list 現在接続中のプレイヤーの名前を全て表示する(Tab ↹キーを押下することでも同じことができる)。 コマンドブロックからであっても、常に成功する。
op <プレイヤー名> プレイヤー名 にサーバーでのオペレーター権限を与える。 常に成功する。
pardon <プレイヤー名> プレイヤー名 をブラックリストから削除し、再びサーバーに接続できるようにする。 常に成功する。
pardon-ip <IPアドレス> IPアドレス をIPブラックリストから削除し、そのIPアドレスからのプレイヤーのサーバーへの接続ができるようにする。 プレイヤー名 のプレイヤーがオンラインである場合。
save-all サーバー上で保留されている、ワールドへの全ての変更をディスクに強制的に書き込む。 常に成功する。
save-off サーバーがワールドファイルに書き込むことを無効にする。ワールドへの変更は一時的に内部に保存される。 常に成功する。
save-on サーバーがワールドファイルに書き込むことを有効にする。これが通常の挙動。 常に成功する。
stop サーバーを停止する。 常に成功する。
whitelist <add | remove> <プレイヤー名> プレイヤー名 をホワイトリストに追加 (add)、削除 (remove) する。 常に成功する。
whitelist list ホワイトリスト中のプレイヤー名をすべて表示する。 常に成功する。
whitelist <on | off> サーバーでホワイトリストを使う (on) か使わない (off) かを切り替える。注意: サーバーのオペレーターは、ホワイトリスト中に名前が載っていなくとも常に接続可能となる。 常に成功する。
whitelist reload white-list.txtを読み込みなおし、ホワイトリストのプレイヤー名一覧を更新する(ファイルが Minecraft 外で変更された際に用いる)。 常に成功する。

コマンドブロック限定コマンド

コマンドブロックでのみ使用可能で、他では使えないコマンド。コマンドブロックは/give <プレイヤー名> 137でのみ得ることが可能。

コマンド 説明
testfor <プレイヤー名 | 選択子> プレイヤー名 のプレイヤーがオンラインであるか、あるいは 選択子 に該当があるかの確認を行う。レッドストーンコンパレーターを使いこのコマンドを実行するコマンドブロックの出力を引き出すことで、選択子 に該当するプレイヤー数を得る事が出来る。例えば「testfor @a[r=3]」とすることで、コマンドブロックの3m内のプレイヤー数に相当する信号レベルの信号が出力される。詳細についてはコマンドブロックの引数節を参照してほしい。

動画

歴史

Java Edition
1.3.112w16aチートモード(シングルプレイでのコマンド)が実装された。
/kill コマンドがクリエイティブモードでも機能するようになった。
12w22a/defaultgamemode コマンドが追加された。
12w24a/publish コマンドが追加された。
12w25aLAN内にワールドを公開する際にチートの有効無効が指定できるようになった。
12w27a/debug コマンドが追加された。
1.4.212w32a/difficulty/gamerule/spawnpoint/weather が追加された。
12w37a/clear コマンドが追加された。
12w38a特定ブロック・アイテムの削除に/clearコマンドが利用可能になった。
12w41a/xp コマンドの値の限界が5,000から2,147,483,647になった。
1.4.41.4.4pre/enchant コマンドが追加された。
1.513w03aコマンドブロック専用コマンド /testfor が追加された。
13w04a/scoreboard コマンドが追加された。
13w09b/effect コマンドが追加された。
開発中のJava Edition
1.613w23a/spreadplayers コマンドが追加された。
新たなゲーム規則 naturalRegneration が追加された。
13w24a新たなゲーム規則 doDaylightCycle が追加された。

豆知識

  • ゲームルール "doFireTick" が "false" にされると、炎は広がらないが、設置されたブロックの如何によらず燃え続け、雨で消え去ることも無くなる。これは雷雨の間は、落雷によりそれなりな数の火災が発生するのでプレイヤーがいちいち消して回らねばならなくなり、非常に困ったものになる。
  • ステータス効果「耐性」のレベル5(増幅度4)を得ているときは、/kill コマンドは機能しなくなる。
    • これはバージョン1.6で修正された(13w24bでも修正済み)。

関連項目

Advertisement