---
title: Game Event
description: "Play 0x26, server → client."
---

`play` · `0x26` · **clientbound** (server → client)

Sends a world or player game state change identified by `event` with a float `value`. Events include start or stop raining, change game mode, win game, rain and thunder level, enable respawn screen, limited crafting, and 'start waiting for level chunks'. The client updates its state; the server sends 'start waiting for level chunks' right after Login, and the client waits for chunks before spawning.

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

## Fields

| Field | Type | Notes |
|---|---|---|
| `event` | Enum | Shape: `number \| { value: number }`. |
| `value` | Float | Optional. |

## Send it

```ts
// 13 = start waiting for level chunks: closes the "Loading terrain" screen once
// the chunk under the player arrives.
await client.sendPacket("GameEvent", { event: 13, value: 0 });

// 7 = rain level, 0 to 1.
await client.sendPacket("GameEvent", { event: 7, value: 1 });

// 3 = change game mode; value is the mode (0 survival, 1 creative, 2 adventure, 3 spectator).
await client.sendPacket("GameEvent", { event: 3, value: 2 });
```

Send event `13` once after `Login` and `SynchronizePlayerPosition`, before the chunks. Other events: `1` begin raining, `2` end raining, `4` win game, `11` enable respawn screen. `value` is ignored by events that do not use it.

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

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