Skip to content
mc-protocol
Esc
↑↓navigate↵open⌘Jpreview
On this page

Edit Book

Play 0x18, client → server.

play · 0x18 · serverbound (client → server)

Sent when the player edits or signs a writable book. hand is the hand holding the book, pages are the new page texts, and title is present only when signing. The server replaces the book item, converting it to a written book if a title is given.

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

Fields

Field Type Notes
hand VarInt also slot
pages Array also entries
title Optional

Send it

await client.sendPacket("EditBook", {
  hand: /* VarInt */,
  pages: /* Array */,
  title: /* Optional */,
});

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

Source: src/Core/Versions/776/Packets/play/serverbound/EditBook.ts

Was this page helpful?