Introducing locks! The 1.4 update for Modern Doors brings locks and keys to every door from this addon! Lock a door to prevent other players from opening or destroying it. Create keys to open the door, or set yourself as the only person able to open it. Server-friendly and griefer-proof!
Locking a door
First, interact with a door while sneaking and with an empty hand. If you get a message saying a door has no owner, destroy the door and place it again. If you get a message saying that you are not the owner, that’s because you can only set up a lock on doors you have placed.
From this door menu, you can access settings or lock the door. If it is the first time you are locking a door, a tutorial prompt will show up asking if you want a tour of the settings. We will click on yes!
Settings for the Door Lock
The first toggle, “Owner Not Affected by Lock”, controls whether the owner of the door needs to use a method to unlock it (such as having the key) or if they can always open the door. This way, the door will be able to be opened by the owner always without restriction. Turning this off means the owner needs to use an allowed method to unlock the door.
The second toggle, “Set Lock to Create Keys”, will set a lock for the door and let you create keys for that door, unique items that only open the door they spawned from. We will let the toggles on their default state (ON) and move on.
After submitting the form, we will see another form, this time asking for the data of the lock and keys. This first toggle, “Use Auto-Generated Key Code”, decides whether the code used for the lock is auto-generated or manually entered. Leave that toggle on, we’ll talk about codes later.
The next fields, “Enter Key Name” and “Enter Key Description”, will let you put a title and a description on the keys to be created. For example, you can put as a title “Agatejam’s Front Door Key” and as a description “For my friend Trota”.
Next, we have the key type dropdown. Currently, you can make Gold, Iron, Copper, and Oxidized Copper keys, regardless of the door you use the key on.
Finally, the number of keys to generate. You can generate up to 20 keys at a time, which will spawn in the same door that is being locked on. Click on submit, and we are done!
Managing Locked Doors
If you had another door of your own next to the door you locked, the same traits will be applied to them. By this time, you should have a locked door and a stack of keys that open them.
But wait, there’s more! By interacting with a door while sneaking and with an empty hand, you can unlock and lock the door and access the lock settings. In the lock settings, you can manage unlocking mechanisms, create new keys, and even change the current lock! Maybe some stole a key from a friend, and now they have access. Well, just change the lock, and all previous keys will be unusable!
Custom Codes
Let’s talk about custom codes. When you set up a lock, a code is attached to the locked door, which is the code the generated keys will have in their lore. If you want multiple doors to be opened by the same key, you can! Just turn off the “Use Auto-Generated Key Code” in the “Key and Lock Settings” form and input the same code other doors you own have. You can also use the “Change Lock” form in the lock settings menu to achieve the same purpose. You can’t just use a code if you don’t have a door with that code, so you do not need to worry about other people creating keys for your doors.
Door Security
Finally, every door that is locked cannot be mined, period, so there’s no chance of a person destroying your door if you lock them.
The 1.4 update marks a milestone in Modern Doors, and because it’s so big, we ask you to report any bugs you might find in the Discord server. Thanks for downloading!