How to Enable Keep Inventory on Your Minecraft Java Server

Learn how to turn on Keep Inventory on your Minecraft Java server so players keep their items after dying, using a simple command from the RiverHosting panel.
By default, players on a Minecraft Java server drop all of their items when they die. If you want a more relaxed experience where players keep their inventory after death, you can enable the keepInventory gamerule. This takes just a moment to set up from the RiverHosting panel, and no file editing is needed.
Before you start
- You need an active Minecraft Java Edition server on RiverHosting.
- Your server must be running before you can send commands through the console.
- You must be the server owner or a subuser with console access.
A gamerule is a built-in Minecraft setting that changes how the game behaves. Keep Inventory is one of many gamerules you can toggle on or off at any time.
1. How to enable Keep Inventory using the console
The easiest way to enable Keep Inventory is to send a single command through the console on your server page. Here is how to do it:
- Go to panel.riverhosting.com and log in to your account.
- Select your Minecraft Java server from the list.
- Make sure your server is running. If it is not, click Start and wait for it to finish loading.
- In the left-hand menu, click Console.
- Click the input field at the bottom of the console.
- Type the following command and press Enter:
gamerule keepInventory trueYou should see a confirmation message in the console output saying the gamerule has been updated. From that point on, players who die on your server will keep all of their items.
Once you see the confirmation in the console, Keep Inventory is active immediately. You do not need to restart the server for this change to take effect.
2. How to disable Keep Inventory
If you change your mind and want players to drop items on death again, you can reverse the setting just as easily.
- Open the Console on your server page.
- Type the following command and press Enter:
gamerule keepInventory falseThis sets the gamerule back to the Minecraft default. Players will drop their items on death as normal from that point forward.
Yes. Gamerules are saved as part of your world data. As long as you do not reset or replace the world, the setting will stay in place even after restarts.
3. How to check the current Keep Inventory setting
If you are not sure whether Keep Inventory is currently on or off, you can check it at any time from the console.
- Open the Console on your server page.
- Type the following command and press Enter:
gamerule keepInventoryThe console will reply with either true or false, telling you the current state of the setting.
Troubleshooting
- The command does not appear to work. Make sure your server is fully started before sending commands. If the console shows the server is still loading, wait until it is ready and try again.
- Players are still losing items. Double-check that the command returned a success message in the console. If the gamerule was applied to a different world than the one currently active, it may not apply. Confirm you are on the correct world.
- The setting reset after a restart. This can happen if the world was reset or replaced. Gamerules are stored in the world save, so replacing the world will remove any gamerule changes. Re-run the command after loading the correct world.
- The console input field is not responding. Try refreshing the panel page and make sure your server is in a running state before attempting to send commands.
If you ever reset or transfer to a new world, all gamerules including Keep Inventory will return to their defaults. You will need to run the command again after the new world loads.
Need help?
If you run into any issues or have questions about your Minecraft Java server, the RiverHosting support team is happy to help.
Visit our support page at https://riverhosting.com/support and open a ticket. We will get back to you as quickly as possible.