Sueta

Code Locks

1.2.2

Lock your chest with a code

·Plugin

Code Locks:
Lock your chest with a code lock

How to Use:
In order for a player to put a lock on their chest, they need the keypad item. (See below for crafting recipe)
Once the player has the keypad item, they can right click on a not already locked chest and set a code any length of their choosing.

Keypad Gui:

Keypad Gui

upload_2020-5-16_21-59-51.png
The gui for opening and setting a lock are the same
Green Pane - Accept key
Yellow pane - Erase current code
Red pane- Cancel setting code/entering code

Keypad Recipe:

Keypad Recipe

upload_2020-5-16_22-5-17.png

To remove a keypad, shift and right click on the sign that's on the chest, and it will drop the keypad and remove the code.

Commands:
/cl give (player) (item) - gives said player a custom item.
Current list of items:
-keypad

Permissions:
codelock.craft - Allows player to craft a keypad
codelock.give - Allows player to give a keypad

Config:
The config contains the following sections:
language - The language of all plugin text except the messages below.
chestAlreadyLockedMessage - The message sent when the player tries to lock an already locked chest
removeKeypadMessage - The message sent when a player removes the keypad
cannotRemoveKeypadMessage - The message sent when a player tries to remove a keypad they don't own
incorrectCodeMessage - The message sent when a player enters an incorrect code


Language File:

If you'd like to customize your item names, refer to the lang file and change the text under your language or add a new one. If you add a language, just simply change the text after language in the config file to the section you've created.
When changing the lore you will see '--', which means a new line on the lore. The color of the lore will not transfer onto the next line unless you add a color code in front of the text after '--'.


Supported Languages:

-EN
-ES
-DE

(If you'd like me to implement your language, or if the translations are bad, send me a pastebin of the text in the lang file in your language)

If you've found any bugs or have any ideas for features, post it in the discussions tab. For faster response, you can contact me on discord @ant#3783

(Before reporting bugs, be sure you're on the latest spigot version through buildtools)

Similar projects

Plugin →