For Minecraft 1.16+
Datapack Features:
Enables any container to be locked with any password you desire!
To lock a container, write “Lock” alone on the first page in a book and quill, and sign it to your desired password.
Then, drop your signed book on top of your container(s) to lock them!
To open your newly locked container(s), rename any item to the same password you used to signed your locking book and open them while holding the renamed item!
Containers include:
Chests, Trapped Chests, Barrels, Shulker Boxes, Furnaces, Smokers, Blast Furnaces, Dispensers, Droppers, Hoppers, Brewing Stands, and Beacons!
Survival & Multiplayer friendly