Skip to content
home/templates//hat command — wear any block
cosmeticBeginnermc 1.20.x – 1.21.x12 lines

/hat command — wear any block

players hold a block, run /hat, and the held item becomes their helmet. pure cosmetic, no stat changes.

vanilla Skriptno addons required.
hat-command.sk12 lines
command /hat:
    permission: hat.use
    permission message: &cYou don't have permission to use this.
    trigger:
        if player's tool is air:
            send "&cHold a block first." to player
            stop
        set {_prev} to player's helmet
        set player's helmet to player's tool
        set player's tool to {_prev}
        send "&aYou are now wearing &e%player's helmet%&a!" to player

get it running

hat-command.sk · 12 lines · vanilla Skript
  1. 1

    copy or download

    grab the .sk file with the buttons up top.

    hat-command.sk· ready to drop in
  2. 2

    drop it in your scripts folder

    save it exactly here on your server — no typos, just copy the path:

    …/plugins/Skript/scripts/hat-command.sk
  3. 3

    reload in-game

    run this in chat or console — your script goes live instantly:

    /sk reload hat-command
that's it — your script is live. hop in-game to try it.
/ related templates

more cosmetic templates

comments