Commands/spectate
< Commands
"spectate" redirects here. For the gamemode, see Spectator.
spectate
Permission level required |
2 |
---|---|
Restrictions |
None |
This feature is exclusive to Java Edition.
Causes a player in Spectator mode to spectate another entity.
Contents
Syntax[edit]
spectate
- Causes a player to spectate another entity .
spectate <target> [<player>]
- Stops spectating
Arguments[edit]
<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 of 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[edit]
Command | Trigger | Java Edition |
---|---|---|
any | the arguments are 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, and the command's executor is not a player. | ||
<player> and <target> are the same. | ||
<player> isn't in spectator mode. | ||
On success | Cause a player to spectate another entity or stop spectating. |
Output[edit]
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[edit]
Java Edition | |||||
---|---|---|---|---|---|
1.15 | 19w41a | Added /spectate . |