Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for vk2gpz

Refactored Legacy Lockette plugin!

Report Lockette?

Lockette

Lock chests, barrels, shulker boxes, furnaces, hoppers, doors, trapdoors and fence gates with [Private] signs. No passwords, no database. Runs on Spigot / Paper / Folia 1.8.8 – 26.x.

History

Lockette was originally written by Acru Jovian and later updated by ElgarL. I (vk2gpz) maintained that original version for some time, but its code base called for a major refactoring and update, so Lockette 4 is a rewrite of it: new structure, one jar for every server version from 1.8.8 to 26.x, owners tied to player UUIDs, Folia support, and no third-party libraries.

Existing [Private] / [More Users] signs, config.yml keys, strings files and permission nodes of the original Lockette keep working.

Building

./gradlew jar              # -> build/libs/Lockette-<version>.jar
./gradlew runServer        # local Paper 26.3 test server with the plugin
./gradlew runServer -PmcVersion=1.8.8

Gradle 9 needs JDK 17+ to run; the plugin is compiled for Java 8. There are no third-party runtime dependencies (Vault is optional, for [group] lines).

Modules

Module Built against Contents
lk:api 1.8.8 LocketteAPI / LocketteProvider for other plugins
lk:core 1.8.8 the plugin: listeners, commands, protection rules, sign stores, scheduler (Bukkit or Folia)
lk:legacy 1.8.8 LegacyBlockAccess – block data values (1.8 – 1.12)
lk:modern 1.14.4 ModernBlockAccess – BlockData (1.13+); PdcSignStore – owner UUIDs on the sign (1.14+)

The adapter is chosen at runtime. Each name line of a Lockette sign is tied to the player's UUID:

  • 1.14+: on the sign itself, in its PersistentDataContainer (lockette:line1–line3 = UUID string, lockette:lineN_name = the name it was tied to). The data moves and disappears with the sign.
  • 1.8 – 1.13: Bukkit has no persistent data on blocks there, so each line keeps uuid|name as the hidden insertion of its text component, which is saved with the sign (InsertionSignStore). Lockette writes its signs so that this is kept; a sign rewritten by another plugin loses it and is tied to players by name again.

Nothing is kept in files. Old name-only signs (from servers without UUIDs) are tied to players' UUIDs when their chunk loads, or the first time a player of that name uses them.

Lockable blocks

Lockette asks the server what each block is rather than relying on a list of names, so blocks added by later Minecraft versions are handled without an update:

  • Doors, trapdoors, fence gates, signs and chests are recognized from the block's own data (1.13+): every wood and every copper variant, and any added later. Copper chests and doors of different oxidation, waxed or not, still lock together as one double chest or double door.
  • Every block with an inventory can be locked on recent server versions (crafters, lecterns, decorated pots, chiseled bookshelves, shelves...), including new ones.
  • On 1.8 – 1.12, and wherever the server cannot tell, the block's name decides.

custom-lockable-block-list in config.yml adds more blocks. Entries can be names (ENCHANTING_TABLE), name patterns ('*_SHELF') or block tags ('#campfires', 1.13+). Entries this version does not have are ignored, so one list works on every version. excluded-lockable-block-list takes the same entries and does the opposite: those blocks cannot be locked at all, even when built in (e.g. LECTERN, so anyone can read a lectern's book). To list every block that can be locked, add blocks to debug-keys.

Commands

Command Permission
/lockette <line> <text> – edit the selected sign –
/lockette fix – reset a locked door you look at –
/lockette reload lockette.admin.reload
/lockette version –
/lockette quick [on|off] – quick protect (placing a sign locks the block) for yourself lockette.quick (default: everyone)
/lockette info – the UUIDs stored for the Lockette sign you look at lockette.info (default: op)
/lockette debug [on|off] [keys] lockette.admin.debug

License

Lockette was originally written by Acru Jovian and updated by ElgarL; this version is maintained by vk2gpz. Like the original, it is released under The Non-Profit Open Software License version 3.0 (NPOSL-3.0).

Information

Category
Protection
Published
December 2, 2026
License
0Downloads
0Stars

Pinned Versions

Members

1