hotbarLock
by swarties
HotbarLock is a lightweight Fabric client mod that lets players lock individual hotbar slots so they cannot be accidentally moved.
What it does
Players lock hotbar slots 1 through 9, and a locked slot cannot be clicked, swapped or otherwise modified in the inventory. Pressing the swap-to-offhand key while a locked slot is selected does nothing, so the item stays where it is. Open the inventory and press 0 to show the HotbarLock window, a small draggable panel with a checkbox for each slot. The window is hidden by default, and the 0 key that toggles it can be rebound inside the window.
The locked slots are saved in a persistent configuration, so they remain in place between sessions, worlds and servers. The mod is client-side only: the environment means only the client needs it, and servers run without it. Fabric API is required. The code is licensed under the GNU Lesser General Public License v3.0 only and is open source. Files target 1.21.11 only, with 1.0.1 as the latest Fabric file from 2026-03-28.
Key features
Hotbar slot locking
Each of the nine hotbar slots can be locked individually to block clicks, swaps and changes.
Offhand swap protection
A locked slot ignores the swap-to-offhand key, so an item cannot be moved there by accident.
Inventory overlay window
A small draggable window in the inventory screen holds one checkbox per slot for quick toggling.
Saved configuration
Locked slots persist in the config file and carry over between sessions, worlds and servers.
Gallery
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Requirements
Dependencies declared by the latest file for each loader.
Required 1
Use cases
Protecting tool slots
A player can lock the slots holding a pickaxe or sword so a stray click during building does not move them.
Who it’s for: Players on Fabric who want fixed hotbar layouts during long sessions, and anyone who often swaps items by accident. The mod works on single-player and multiplayer clients alike.
How it compares
AutoInventorySorter is a Fabric client mod for 1.21.5 – 1.21.11 under the MIT License that sorts inventory contents. Simple Hotbar Switcher is built for 1.21.11 under the MIT License and runs on the client or server, with neither side required. HotbarLock differs by locking slots in place rather than sorting or switching them.
| Mod | Loaders | Game versions | Environment | Updated |
|---|---|---|---|---|
| hotbarLock | Fabric | 1.21.11 | Client-side only | 2026-03-28 |
| AutoInventorySorter | Fabric | 1.21.5 – 1.21.11 | Client-side only | 2026-06-01 |
| Simple Hotbar Switcher | Fabric | 1.21.11 | Client or server, optional | 2026-04-12 |
Questions
Does HotbarLock need Fabric API?
Does the server need HotbarLock installed?
Which game versions does HotbarLock support?
In the catalog
hotbarLock is one of 36,990 Utility mods on ModsFinder, and one of 25,772 Utility mods for Fabric. 19,862 mods support Minecraft 1.21.11.
Similar mods
What the author says
HotbarLock is a lightweight, fully client-side Fabric mod that lets you lock individual hotbar slots to prevent accidental item movement.
Official listing
- Modrinth page
- modrinth.com/mod/hotbarlock
- Owner
- swarties
- Published
- 2026-03-23
- Updated on Modrinth
- 2026-03-28
- Facts verified
- 2026-10-15
