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

Select Trade

Play 0x33, client → server.

play · 0x33 · serverbound (client → server)

Sent when the player clicks a trade in the villager trading GUI. slot is the index of the selected offer. The server fills the trade input slots from the inventory and sends slot updates.

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

Fields

Field Type Notes
slot VarInt

Send it

await client.sendPacket("SelectTrade", {
  slot: /* VarInt */,
});

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

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

Was this page helpful?