---
title: Rename Item
description: "Play 0x30, client → server."
---

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

Sent while the player types in the anvil name field. `name` is the new item name (max 50 characters). The server updates the anvil result slot and cost.

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

## Fields

| Field | Type | Notes |
|---|---|---|
| `name` | String | also `itemName` |

## Send it

```ts
await client.sendPacket("RenameItem", {
  name: /* String */,
});
```

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

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