Spectator Action
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
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