Commands/spectate
Minecraft Wiki article. Categories: Java_Edition, Commands
📌 Mirrored from Minecraft Wiki
This article is reproduced from Commands/spectate on the Minecraft Wiki. Mirrored from revision 3094549. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.
On this page
This feature is exclusive to Java Edition.
/spectate{
"title": "<code>/spectate</code>",
"rows": [
{
"field": "2",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "None",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Causes a player in Spectator mode to spectate another entity or stop spectating.
If the spectator is away from the target, the command will result in a camera follow mode, instead of the default first-person view.
Syntax
spectate <target> [<player>]
- Causes a player to spectate another entity.
spectate
- Stops spectating.
Arguments
<target>: entity
- Specifies the target to be spectated.
- Must be a player name, a target selector or a UUID. And the target selector must be in single type.
<player>: entity
- Specifies the spectating player. If unspecified, defaults to the executor.
- Must be a player name, a target selector or a UUID. And the target selector must be of single-player type.
Result
| Command | Trigger | Java Edition |
|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable |
<target> fails to resolve to an entity (named player must be online). | Failed | |
<player> fails to resolve to a online player. | ||
<player> is not specified when the command's executor is not a player. | ||
<player> and <target> are the same. | ||
<player> isn't in spectator mode. | ||
| Otherwise | Successful |
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | 0 | 0 | 0 |
| On success | 1 | 1 | 1 |
History
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.15 | 19w41a | Added /spectate. | |||||
| 1.19.4 | 23w03a | Now /spectate command works between dimensions.[1] | |||||
References
- ↑ MC-224960 – resolved as "Fixed".
Navigation
Sources
- Commands/spectate — Minecraft Wiki, CC BY-NC-SA 3.0, revision 3094549.