Commands/spectate

From Minecraft Wiki
Jump to: navigation, search
"spectate" redirects here. For the gamemode, see Spectator.
spectate
Restrictions

Operator

First introduced

Java Edition 1.15 (19w41a)

Information icon.svg
This feature is exclusive to Java Edition.

Causes a player in Spectator mode to spectate another entity.

Syntax[edit]

spectate

Causes a player to spectate another entity .

spectate <target> [<player>]

Stops spectating

Arguments[edit]

<target>: entity

Must be a player name, a target selector or a UUID.  And the target selector must be of single type.
Specifies the target to be spectated.

<player>: entity

Must be a player name, a target selector or a UUID. And the target selector must be of single-player type.
Specifies the spectating player. If unspecified, defaults to the executor.

Result[edit]

CommandTriggerJava Edition
anythe arguments are not specified correctly Unparseable
if <target> fails to resolve to an entity (named player must be online) Failed
if <player> fails to resolve to a online player
if <player> is not specified and the command executor is not a player.
if <player> and <target> are the same.
if <player> isn't in spectator mode.
On successCause a player to spectate another entity or stop spectating.

Output[edit]

CommandEditionSituationSuccess Count/execute store succeess .../execute store result ...
anyJava EditionOn fail000
On success111

History[edit]

Java Edition
1.1519w41aAdded /spectate.