
Command
/spectate
Makes a player in Spectator mode view the world through another entity, or stops doing so.
| /spectate [<target> [<player>]] |
| Argument | Kind of value | What to type |
|---|---|---|
| <target> | Target selector | The single entity to view the world through. Leave it out to stop spectating. One entity only. |
| <player> | Target selector | The single player who becomes the spectator. Defaults to the player running the command. One player only. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Singleplayer with cheats enabled, multiplayer servers, command blocks and functions. Needs permission level 2 (gamemasters): operators, players in a world with cheats enabled, command blocks and functions. |
| Result | Reports "Now spectating" with the entity's name, or "No longer spectating an entity" when stopping. The number /execute store saves is 1. |
| No arguments | Without a target the player running the command stops spectating and returns to their own view. |
| Spectator mode only | The spectating player must be in Spectator mode, otherwise the command fails with "... is not in spectator mode". |
| Not yourself | A player cannot spectate themselves: "Cannot spectate yourself". |
| Entities that cannot be spectated | Some entity types cannot be viewed and fail with "... cannot be spectated". |
| Who spectates | Without the player argument, the player running the command is the spectator, so command blocks and the console must name a player. |
/spectate @e[type=minecraft:creeper,limit=1,sort=nearest]Lets you watch through the nearest Creeper while you are in Spectator mode.
/spectate AlexLets you watch through the player Alex.
/spectate Alex SteveMakes Steve, who must be in Spectator mode, watch through Alex.
/spectateStops spectating and returns you to your own view.

