Demo CodeLock Addon

Client + serverVersion 1.0Updated October 14, 2026
On this page
  1. What you need
  2. Locking a door
  3. Opening a locked door
  4. Managing your lock
  5. Raiding
  6. Lock lifetime
  7. Demo Territory
  8. Admins
  9. Messages

Put a code lock on any door of any building on the map. Lock up a house, a shed or a police station, share the code with your group, and saw through other people's locks with a hacksaw.

  • Lock any closed building door with a CodeLock.
  • Owner and guests. Whoever sets the code owns the lock. Anyone who enters the right code once gets in for good, until the owner changes it.
  • Manage your lock: open the door, change the code (which locks out every guest), or take the lock back off.
  • Raid with a Hacksaw.
  • Lock lifetime (when the server turns it on): locks near a raised flag stay forever, abandoned ones fall off after a week.
  • Works with Demo_Territory and LBmaster Raid Alert.

The numbers on this page are the defaults. Servers can change most of them.

What you need

Item Used for
CodeLock Locking a door. Comes from the CodeLock mod, the same lock you put on gates and fences
Hacksaw Raiding a locked door. Vanilla item

The addon adds no new items.

Locking a door

  1. Close the door.
  2. Take a CodeLock in your hands, look at the door and use Attach Codelock to Door.
  3. Type a passcode (3 to 6 characters) and press Enter or click the button.
  4. Type it again to confirm.
  • Every door is locked on its own. A building with four doors needs four locks for full cover.
  • The lock keeps the health of the CodeLock you used. A damaged lock is quicker to saw through.
  • You become the lock's owner. Ownership can't be passed on.

Opening a locked door

Look at the closed door and use Open Locked Door.

  • Owner or guest: the door opens.
  • Anyone else: the passcode screen opens. The right code opens the door and makes you a guest, so next time it opens straight away.

After a server restart, every door with a code lock starts closed.

Managing your lock

Owners only. Look at the closed door and hold Manage Lock, then enter the passcode and pick:

Button What it does
Enter Opens the door
Change Asks for a new code twice. Every guest loses access
Remove Takes the lock off the door. The CodeLock drops at your feet with its health

Guests can't manage the lock. A guest who leaves your group keeps access until you change the code.

Raiding

  1. Take a Hacksaw in your hands.
  2. Look at the closed, locked door and hold Destroy Codelock. The prompt shows the lock's health.
  3. Each finished cut takes a chunk of health off the lock. A fresh lock needs 15 minutes of sawing in total.
  • The Hacksaw takes damage when the lock finally breaks.
  • A broken lock drops on the ground at the door as a ruined CodeLock, and the door opens normally.

Lock lifetime

Off by default. When a server turns it on:

  • A lock with a vanilla flag pole nearby (flag attached, within 60 m of the building) never runs out.
  • A lock with no flag nearby counts down from 7 days of server time. Raising a flag tops it back up. Servers can change both the 7 days and the 60 m.
  • When it runs out, the lock falls off and drops at the door as a CodeLock, with the health it had.

Demo Territory

On servers that run Demo_Territory, outsiders can't attach a door lock inside someone else's raised territory. Members can. Locks that were already there stay, and their owners can still change the code.

Admins

Server admins (the CodeLock mod's admin list) get Admin Lock on every locked door:

Button What it does
Open Opens the door without the code
Remove Takes the lock off. The CodeLock drops at the admin's feet

Messages

Message What to do
TOO SHORT The code needs at least 3 characters
CONFIRM PASSCODE Type the same code again
DOES NOT MATCH The two codes were different. Start again
INVALID PASSCODE! Wrong code
RATE LIMITED! Too many tries too quickly. Wait a moment
  • Attach Codelock to Door doesn't appear: close the door, and make sure it doesn't already have a lock. On Demo_Territory servers, you may be inside someone else's territory.
  • Destroy Codelock doesn't appear: close the door. The server may also have turned off raiding doors.
  • Manage Lock doesn't appear: only the owner gets it. Guests use Open Locked Door.

← All mods