HyperScript
Docs

← All of the Docs What players see

Resource packs

effectsend resource pack <url>since 1.4.0

A direct download link to the pack's .zip file

send resource pack "https://example.com/pack.zip" with hash "da39a3ee5e6b4b0d3255bfef95601890afd80709" to player
Try it
effectwith hash <sha1>since 1.4.0

Optional: the file's SHA-1 hash, which is 40 hexadecimal characters

send resource pack "https://example.com/pack.zip" with hash "da39a3ee5e6b4b0d3255bfef95601890afd80709" to player
Try it
expressionto <who>

Optional; the default is the player of this trigger

send action bar "&aDownloading server resource pack..." to player
Try it
Guide and examples
on player join:
    send resource pack "https://example.com/pack.zip" with hash "da39a3ee5e6b4b0d3255bfef95601890afd80709" to player

on resource pack accept:
    send action bar "&aDownloading server resource pack..." to player

on resource pack decline:
    send "&cYou declined the resource pack! Some custom items may appear incorrectly."

on resource pack successfully loaded:
    send "&aResource pack loaded successfully!"
    play sound "ui.toast.challenge_complete" at player's location
PartMeaning
send resource pack <url>A direct download link to the pack's .zip file
with hash <sha1>Optional: the file's SHA-1 hash, which is 40 hexadecimal characters
to <who>Optional; the default is the player of this trigger
  • The hash lets a player's game verify the download and reuse a copy it already has. Without it, the pack is downloaded again on every join.
  • A hash that is not 40 hexadecimal characters is not a SHA-1 hash (32 characters is an MD5 hash, for instance). HyperScript logs a warning and sends the pack without a hash, because a wrong hash would make every client reject the pack.
  • The four events tell you how each player responded. A player normally produces accept and then either successfully loaded or failed; decline comes instead of all of those.