Skip to content

Keys and Flags

Parker Hawke edited this page Jul 9, 2020 · 2 revisions

LockSecurity lets users lock their own blocks with keys but also provides administrative users with ways to control these keys in order to make them more RPG-friendly. This page will explain how to manage keys as a player and as an administrator for your users.

Users - Key Management

Merging Keys

Do you notice a lot of keys piling up in your inventory? Having more than a few locked blocks can be quite inconvenient if players want to lock all of their chests. Luckily, LockSecurity provides players with a way to merge multiple keys into one using dynamic, shapeless recipes.

Merging Keys

After the keys have been merged in a crafting table, that one key may be used to access the locked blocks from both keys. You may merge any two keys together and their locked blocks will be merged as well. There is no limit to how many blocks a single key can unlock.

Duplicating Keys

LockSecurity is first and foremost a block protection plugin and aims to provide players with a secure way to keep their items from others. With that being said, it's also understood that some players may want to share access to a block. In such a situation, a player may duplicate a key in a crafting table and give the key to another player so they may access the block. This can be done by placing the key you want to duplicate and an unsmithed key in a crafting table as such!

Resetting Keys

After unlocking a bunch of blocks, it's possible that a key says it will lock a block when it no longer exists. Or perhaps a player wants to re-use a key and re-smith it for another block they own. For this reason, LockSecurity lets you place a smithed key in a crafting table to remove all its locked blocks and flags and return it back to an unsmithed key. This recipe is free to let players recycle keys as they please.

Administrators - Key Flags

In addition to the recipes above for players, administrators are granted access to key flags which dictate how a key should behave or look. Keys may slightly alter the functionality of a key and act almost as a deterrent for certain actions. Flags may be added or removed from a key using the /editkey command (which you can learn more about on the Commands wiki).

LockSecurity supports the following flags:

Flag Name Description Default Value
Prevent Duplication The key cannot be duplicated in a crafting table with an unsmithed key false
Prevent Merging The key cannot be merged in a crafting table with another smithed key false
Prevent Resetting The key cannot be reset in a crafting table false
Break On Use The key will break when used to open a block false
Hide Block Coordinates The key should hide coordinates in the key's lore (if possible) false
Hide Flag Lore The key should hide the lore applied on the item by other flags false

All of the above flags may be placed on a key and given to a user. As of LockSecurity 3.0.0, there is no way to apply these flags to newly generated keys and may only be applied to those modified with the /editkey command, but future releases will have these flags all be configurable.

Key Flags

NOTE: Permission nodes (namely for prevent duplication, merging and resetting) are not prioritized. If a player has permission to duplicate a key but has the prevent duplication key, they will not be allowed to duplicate the key. Additionally, if the player does not have permission to duplicate a key but the key does not prevent duplication, the player will not be allowed to duplicate the key.