CodeLock
CodeLock allows you to lock chests and doors without using any commands. Rather than locking a chest to a specific player, it locks it with a code. Then, anybody who wants to access the chest, including the owner, must enter the code to gain access.
Usage
To lock a chest or door, click on it while sneaking. This will open a fake chest window that looks something like this:

Then click on the icons in the order you desire to create your code. When you're done, just close the inventory window, and the chest or door will be locked! Now whenever you try to open it, that same window will pop up and ask you for your code. If you enter it incorrectly, you can just close the window and try again.
To remove a lock, just sneak and click again. It will ask you for your code, and when you enter it the lock will be removed.
The following blocks can be locked:
- Chests
- Doors
- Dispensers
- Furnaces
- Brewing stands
- Enchantment tables
- Levers
- Buttons
Installation
Just drop the CodeLock.jar file into your plugins folder!
Configuration
When the plugin first loads, a config.yml file will be created in its folder. These are the config options:
| Option | Description |
|---|---|
| lock-inventory-size | The size of the inventory to use for the lock screen. This should be a multiple of 9. |
| lock-title | The title of the lock screen. |
| buttons | The item ids of the buttons for the lock screen. |
| button-positions | The positions of the buttons in the lock screen inventory window. |
| letter-codes | The letters that match with the buttons. This is used to tell the player what their code is. |
| auto-door-close | How long to wait to close a door that was recently unlocked. Set it to 0 to disable this feature. |
| check-build-perms | Whether to check if the player has permission to build before allowing them to lock a door or chest. |
| lockable | A list of lockable blocks. Other blocks cannot be added to the default list, but blocks can be removed. |
| str-locked | The message that shows appears a player locks a door or chest. It also tells them the code used. |
| str-removed | The message that appears when a lock is removed. |
Permissions
| Node | Description | Default |
|---|---|---|
| codelock.bypass | Anyone with this permission can open a door or chest without entering the code, and it will tell them the code when they open it. | op |
| codelock.lock | This permission is required to add and remove locks. | true |
-
View User Profile
-
Send Message
Posted Aug 9, 2012Yeah, gosh what a tease. I should have given you a pastebin. As luck would have it I zapped that log while upgrading plugins. I went back a week on my hourly rsnapshot backups and could not find a duplicate. That might be good, right? I haven't had a lot of codelock activity yet. I will absolutely save it and get it to you if/when I get another one.
I hope I remembered to tell you I like your plugin. Regards.
-
View User Profile
-
Send Message
Posted Aug 9, 2012@mcfacilitator
Can you give me the whole error, and not just the first line?
-
View User Profile
-
Send Message
Posted Aug 9, 2012Great plugin. I am getting:
13:51:49 [SEVERE] Could not pass event InventoryClickEvent to CodeLock
With the standard console blow up with 1.31, current dev-vers.
I'm not sure what that user experienced, but in my tests codeblock appears to be working. Regards.
-
View User Profile
-
Send Message
Posted Jun 18, 2012Please add chestcarts, enchantment tables and trapdoors as lockable blocks.
-
View User Profile
-
Send Message
Posted Jun 4, 2012@AkiraShirou
I'm not sure how you can do that. I tried and failed many times.
-
View User Profile
-
Send Message
Posted Jun 4, 2012did anyone notice other than my lil bro that if you do not use the exactly listed build CB then players could dupe items by opening the codelock interface then shift clicking the items to dupe it?
-
View User Profile
-
Send Message
Posted May 31, 2012Please add permission for creating codes please.
-
View User Profile
-
Send Message
Posted May 15, 2012hello thanks for the plugin just something it is possible to have a permissions?
-
View User Profile
-
Send Message
Posted May 3, 2012Hey there! Just figured you'd like to know we featured your mod in the first episode of our "Mod Spot" series! Hope you like it!
http://www.youtube.com/watch?v=_A7ykyEnN64
-
View User Profile
-
Send Message
Posted Apr 11, 2012brilliant! and still works no problem with 1.2.5
any chance of being able to set a list of codes? e.g. after a code BBBE is used up it will only accept the next one in the list
-
View User Profile
-
Send Message
Posted Apr 3, 2012What an interesting plugin! I'll be sure to add it to my server. Also, A quick question and/or idea, Have you ever considered the ability to add and remove icons so you could make a more/less complicated code?
-
View User Profile
-
Send Message
Posted Mar 23, 2012Really cool plugin! Keep up that great work :)
-
View User Profile
-
Send Message
Posted Mar 23, 2012Looks pretty good!
-
View User Profile
-
Send Message
Posted Mar 23, 2012Very nice plugin. I'll test it tomorrow :)