---
title: Spectator Action
description: "Play 0x3E, client → server."
---

`play` · `0x3E` · **serverbound** (client → server)

Spectator teleport request. `entityId` identifies the target player selected in the spectator menu. The server teleports the spectator to that entity if it exists.

Sent by the client, read by the server. Listen for it with `client.on("SpectatorAction", (data) => …)` on the receiving side.

## Fields

| Field | Type | Notes |
|---|---|---|
| `entityId` | OptVarInt |  |

## Send it

```ts
await client.sendPacket("SpectatorAction", {
  entityId: /* OptVarInt */,
});
```

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: [`src/Core/Versions/776/Packets/play/serverbound/SpectatorAction.ts`](https://github.com/GDLev/mc-protocol/blob/master/src/Core/Versions/776/Packets/play/serverbound/SpectatorAction.ts)
