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

Resource Pack Push

Configuration 0x09, server → client.

config · 0x09 · clientbound (server → client)

Asks the client to download and apply a resource pack: uuid, URL, SHA-1 hash, forced flag, and an optional prompt message. The client reports progress with ResourcePack (serverbound). If forced and the player declines, the client disconnects.

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

Fields

Field Type Notes
uuid UUID
url String
hash String
forced Boolean
promptMessage Optional

Send it

await client.sendPacket("ResourcePackPush", {
  uuid: "12345678123456781234567812345678",
  url: "https://cdn.example.com/server-pack.zip",
  hash: "0123456789abcdef0123456789abcdef01234567", // SHA-1
  forced: false,
  promptMessage: { text: "Install the server resource pack?" },
});

Use a stable 32-hex-character UUID to identify the pack and its 40-character SHA-1 in hash. Set promptMessage to null to omit the custom prompt. The client reports progress with serverbound ResourcePack packets.

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

Source: src/Core/Versions/776/Packets/config/clientbound/ResourcePackPush.ts

Was this page helpful?