Locki
by Ladysnake
Locki is a Quilt library that controls which slots of a player's inventory are locked, driven by a command and a set of named lock rules.
What it does
Inventory slots are represented as nodes in a tree. A node is written as a dot-separated path, from the least specific ancestor to the most specific child, so inventory describes the whole inventory and inventory.armor.chest describes the chestplate slot. Locking a node also locks every node beneath it, while a descendant that is cleared keeps its lock state separate from its ancestors, which lets a lock cover a broad area and still exclude a single slot.
A lock is applied with the locki command, which takes a target player (by username or selector, defaulting to the player running the command), an inventory node, and an optional lock identifier. Omitting the identifier uses a generic command lock. Locking inventory and then clearing the lock on inventory.armor.chest, for example, stops the player from touching any item except the chestplate. The mod is used standalone through this command, and it has to be installed on both the server and the client for the locks to work properly.
Locki is open source under the GNU Lesser General Public License v3.0 or later, and its source code and issue tracker are public. It is published for Quilt only, in five game versions 1.19.3 – 1.21, and the latest Quilt file is 0.13.0 for 1.21, released on 2024-06-16.
Key features
Inventory node tree
Slots are addressed as dot-separated paths, from broad sections down to individual slots.
Command-driven locks
The locki command locks or releases a node for a chosen player, with an optional command block as the source.
Named lock identifiers
Each lock can carry an identifier, so a later command can target the same lock and change the inventory again.
Exclusions inside broad locks
A child node inside a locked section can be left open while the rest of the section stays locked.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Use cases
Who it’s for: Pack and map makers who need to restrict parts of a player's inventory from commands or command blocks, and server owners who run such content on multiplayer servers.
Questions
Does Locki need to be installed on the client?
Which loader does Locki support?
How is a slot named in a lock command?
In the catalog
Locki is one of 3,514 Library mods on ModsFinder, and one of 628 Library mods for Quilt. 15,770 mods support Minecraft 1.21.
More from Ladysnake
Similar mods
What the author says
A Quilt library handling player inventory locking. Can also be used as a standalone mod, through the /locki command. This mod must be installed on both server and client to work properly.
Official listing
- Modrinth page
- modrinth.com/mod/locki
- Owner
- Ladysnake
- Published
- 2023-02-27
- Updated on Modrinth
- 2024-06-16
- Facts verified
- 2026-10-15
