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 |
DEFINITELY NOT WORK ON 1.10
VERY SAD
Works 1.8 but not the 1.8 doors
It works in 1.7.2 excelent! :3
nice idea but for 1.7+ ?
Is it available for 1.6.4?
Awesome just one thing: How do I make it so you have to enter it every time?
Cant players just break the chest to gain the items?
I tried to use this plugin but does it not need updated?
So far I love this Mod but I found one thing with the doors if you place a Redstone Torch in front of a code locked door it will open without entering the code.
Minecraft 1.6.2 CraftBukkit 1.6.2 R0.1
Can you add permission nodes for each of the items it works on? I only want players to use this plugin for doors.
Great plugin, love it, however, there is just one possible bug.
Also the plugin will not work if I set the chest size to 9 with buttons at pos 1-9 is this a glitch, or does the inv have to be a minimum size? Also it doesnt seem to support using moded items as the icons for the lock. :(
Thanks for the great plugin.
Question please. the server i play on uses ironchest.mod but nothing they can use will secure them, this is very sad, they have tried everything and vanilla chest are not always the best size. can your mod effectively lock these types of items, is there a way to add storage items to your awesome mod? tyvm Jarvis
Locked doors don't auto-close behind someone who opens it with the codelock.bypass permission.
What is command to set a code!?
Nisovin,
Great plugin, amazing job, keep going!
How i can set code in pressure plates? i try add name pressure_plate or pressure_plates i not works.
Cool thanks that you've updated it!! :D
Hi, I love the look and idea of your plugin, I was just checking whether it's updated to 1.4.7? as I really wanna use it on my server
Thanks
Very cool, please update to 1.4.2
Cool plugin! Only one thing: If you put a Chest and lock it, everything is fine. But if you put another chest near the previously put chest, the 2 chest become a large chest. The block that you have locked ask for a password, but the other no! So you can open the large chest just opening the unlocked chest. It's a small thing, because locking a chest when is already large doesn't do this, but if you want fix it :)
@nisovin
Any chance we can get some lock picking on this? Maybe a configurable item (or items) that give the user a % chance (if several items, each one has it own chance) to unlock/open the chest/door/whatever. I'd use the codelock.bypass but it gives up the code after.