---
title: Player Command
description: "Play 0x2A, client → server."
---

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

Entity action for the player (`entityId` is the player's own id): start/stop sneaking, leave bed, start/stop sprinting, start/stop horse jump, open vehicle inventory, or start elytra flight. `jumpBoost` (0-100) is used only for horse jump charge.

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

## Fields

| Field | Type | Notes |
|---|---|---|
| `entityId` | VarInt |  |
| `actionId` | VarInt | Enum: `0` leave_bed, `1` start_sprinting, `2` stop_sprinting, `3` start_horse_jump, `4` stop_horse_jump, `5` open_vehicle_inventory, `6` start_elytra_flying. |
| `jumpBoost` | VarInt |  |

## Send it

```ts
await client.sendPacket("PlayerCommand", {
  entityId: /* VarInt */,
  actionId: /* VarInt */,
  jumpBoost: /* VarInt */,
});
```

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

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