Pages
Safety & fairness

Chest locks

Make chests, barrels and doors your own

Lock chests, barrels, shulker boxes, hoppers, furnaces, decorated pots, doors (almost any block), plus armor stands, item frames, paintings, minecarts, boats and animals, so only you and the people you allow can use them. "Chest" on this page means anything you can lock.

4 sections About 4 min read

Keep truly important items in your Ender Chest

Locks are removed after 60 days without use, and on town land the mayor and vice mayor can open them. Put anything you really can't afford to lose in your Ender Chest — only you can open it.

Placing doesn't lock

By default (nolock), placing a chest doesn't lock it. Run /lock and click it, or sneak and right-click it twice with an empty hand. With /lock mode lock, blocks you place are locked (private) automatically.

How to read commands (read this first)
  • name
    Orange dashed box: replace it with your own value

    Don't type the word in the box — put your own value there.
    /t new name → /t new SakanaTown/t new name

  • name
    Gray dashed box: optional, you can leave it out

    The command works without it. If you add it, use your own value.
    /home name → /home or /home base

  • on/off
    Blue box: pick just one of the words separated by "/"

    Type only one word, without the "/". Each option is explained right under the command.
    /plot toggle pvp/fire → /plot toggle pvp/plot toggle pvp/fire

Click a command row to copy it up to the first box, then type the rest yourself.

01Locking

  1. Run /lock (then click within 60 seconds)
  2. Click the chest you want to lock → it is locked as private
  3. Or sneak and right-click the same chest twice with an empty hand
CommandDescription
private
Only you and people you allow (default for /lock)
public
Anyone can use it; only you can break or configure it
deposit
Anyone can put items in, but not take them out
display
Anyone can look inside, but not touch
withdrawal
Anyone can take items out, but not put them in
lock
Lock (private) when placed
nolock
Don't lock when placed
persist
Keep the command active for every click until /lock cancel
nospam
Hide common messages such as auto-lock notices

02Passwords

Passwords use only English letters (upper or lower case) and numbers, 3–12 characters. Public locks can't have one; change the type first.

When someone else opens a password-locked chest, they're asked to type the password in chat. If they type it within 300 seconds of clicking, they can use the contents from then on — but they can't manage the lock. Nobody else sees the typed password.

Owners never need the password. Changing or removing a password takes access away from everyone who used the old one.

About the all-locks password

If someone unlocks any one of your locks with it, they can use the contents of all your locks (but not manage them).

CommandDescription

03Trust, hoppers and redstone

You can trust any number of players on each chest. Trusted players can use the contents but can't manage the lock.

Locked chests block hoppers and similar blocks that you haven't locked yourself (unlocked ones, other players' ones, and public ones), both pulling out and pushing in. Use ejecthopper / enterhopper to allow them.

Redstone opening and triggering is allowed by default.

CommandDescription
add
Trust
remove
Untrust

04Protection and automatic removal

  • Others can't open, break, or extend a locked chest into a double chest
  • Explosions, pistons, fire and mobs can't break locked blocks
  • With deposit, display and withdrawal, others can still use doors and buttons and open containers (only taking/putting is limited). Riding minecarts, horses and the like needs public
  • Armor stands and item frames: deposit lets others put items, withdrawal lets them take, display lets them do neither
  • Locks nobody has used for 60 days are removed automatically
  • If the owner hasn't logged in for 60 days, all their locks (public, display and the rest too) are removed
  • If someone is banned for 60 days or longer (including permanent bans), all their locks are removed 10 days after the ban
  • The mayor and vice mayor can open, use, break and remove every lock on their town's land, so nobody can grief a town by placing locked chests
  • Locks that existed while the land was wilderness get a 10-day protection period after the land joins a town, during which even the mayor and vice mayor can't open them. The owner is notified and can collect the contents or the block from anywhere with /lock claimed. After 10 days the lock is removed and any remaining contents stay where they are