keepinventory-command
Losing your entire inventory after a surprise creeper explosion is one of the most frustrating moments in Minecraft. The global keepInventory gamerule helps, but it applies to everyone on a server equally. What if you want to protect only certain players, or toggle the rule for yourself without affecting others? That is exactly where the keepinventory-command add-on shines. This lightweight Fabric mod introduces a flexible command that lets you set per-player inventory persistence, overriding the gamerule with surgical precision.
What Makes keepinventory-command Different?
Unlike the vanilla /gamerule keepInventory true which is a blunt instrument, this mod adds a targeted command. You can keep your own items safe while your friends still face the classic survival risk, or grant a new player a safety net without changing the whole world. The mod runs entirely on the server side using Fabric and Fabric API, so clients do not need to install anything to benefit from it. That means zero hassle for players joining your world.
Two Command Forms for Total Control
The mod provides two variations of the command, each designed for different permission levels:
- /keepinventory [value] – Sets the keepinventory state for yourself. Every player can use this form, making it perfect for personal preference on multiplayer servers. Valid values are
true,false, anddefault. - /keepinventory [targets] [value] – Sets the state for one or more targets using standard Minecraft selectors (like
@a,@p, or a player name). Only operators have access to this form, giving admins fine-grained control.
The default value is particularly clever: it makes the player obey the world’s keepInventory gamerule again, effectively removing the per-player override. This means you can temporarily grant protection and later revert it seamlessly.
Supported Minecraft Versions and Loader
The keepinventory-command mod is built for the Fabric mod loader and requires Fabric API to function. It is compatible with modern Minecraft releases, including 1.19, 1.20, and the latest 1.21 updates. Because it is a server-side mod, you only need to place it in your server’s mods folder; players joining with a vanilla client will experience the per-player inventory rules without any extra steps. For singleplayer worlds, simply install Fabric and Fabric API, then drop the mod into your local mods directory.
How to Install keepinventory-command
Getting started is straightforward. Follow these steps to add the mod to your server or singleplayer game:
- Ensure you have a Fabric server or Fabric client installed for your Minecraft version.
- Download Fabric API from a trusted source and place it in the
modsfolder. - Download keepinventory-command and add the JAR file to the same
modsfolder. - Restart the server or game. The mod will load automatically.
- As an operator, test the command with
/keepinventory @p trueto verify it works.
If you are managing multiple add-ons, the foxygame.net launcher can simplify the process dramatically. Its built-in add-on catalog includes keepinventory-command for one-click installation, and the launcher automatically handles Fabric API dependencies and version compatibility checks, so you never have to hunt for the right file again.
Practical Use Cases for Servers and Singleplayer
This mod is a game-changer for server administrators. Imagine a community server where donators receive the perk of keeping their inventory, while regular players do not. With /keepinventory [donator] true, you can grant that benefit instantly. Or, during a special event, you might want to protect all participants: /keepinventory @a[team=event] true. The selector support makes it incredibly flexible.
In singleplayer, you might use the personal command to give yourself a safety net while learning a new modpack, then switch back to default once you feel confident. The mod remembers your setting across sessions, so you do not need to re-enter it every time you log in.
Why Choose a Per-Player Approach?
Global gamerules are static. They do not adapt to individual playstyles or server roles. The keepinventory-command for Minecraft fills that gap elegantly. It respects the existing gamerule while adding a layer of personalization. The mod is also incredibly lightweight, adding virtually no overhead to your server. The developer created it in just a few hours, so it is intentionally minimal and focused. If you encounter any issues, the GitHub repository is open for bug reports, and the community is generally supportive.
Final Thoughts
Whether you run a bustling multiplayer server or just want more control over your own survival experience, the keepinventory-command mod is a must-have utility. It solves a common pain point with a simple, elegant command that anyone can understand. The ability to mix and match per-player states with the global gamerule opens up creative gameplay scenarios that vanilla Minecraft simply cannot offer. Download keepinventory-command today and take the first step toward a frustration-free inventory system.
