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:

CodeLock

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

Default Config File

When the plugin first loads, a config.yml file will be created in its folder. These are the config options:

OptionDescription
lock-inventory-sizeThe size of the inventory to use for the lock screen. This should be a multiple of 9.
lock-titleThe title of the lock screen.
buttonsThe item ids of the buttons for the lock screen.
button-positionsThe positions of the buttons in the lock screen inventory window.
letter-codesThe letters that match with the buttons. This is used to tell the player what their code is.
auto-door-closeHow long to wait to close a door that was recently unlocked. Set it to 0 to disable this feature.
check-build-permsWhether to check if the player has permission to build before allowing them to lock a door or chest.
lockableA list of lockable blocks. Other blocks cannot be added to the default list, but blocks can be removed.
str-lockedThe message that shows appears a player locks a door or chest. It also tells them the code used.
str-removedThe message that appears when a lock is removed.

Permissions

NodeDescriptionDefault
codelock.bypassAnyone 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.lockThis permission is required to add and remove locks.true

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files

Bukkit