Keep inventory keeps turning off - won't save
I have used keepinventory on my vanilla Minecraft server for about 18 months and it has been set to "true" for most of this time. The latest update seems to have set it to "False" - I have reset it to "true", but every time I restart the server, it sets back to "False". This is the same whether cheats are enabled, or if I have completely re-copied the files from a new download. I cannot get past this and it seems to only be this one setting that won't save after a restart.
Server is hosted on Windows 11, fully patched
Environment
Windows based server
Linked Issues
Comments24
History9
Confirmation Status: Unconfirmed → Community Consensus
Added is duplicated by link: MCPE-189071Keepinventory setting reverts to false on server rebootDuplicate
Resolution: Unresolved → Awaiting Response
Resolution: Awaiting Response → Unresolved
Resolution: Unresolved → Awaiting Response
Resolution: Awaiting Response → Unresolved
Yes! I encountered the same problem as you. My server had no problems with not dropping items when I died in previous versions, but after upgrading to this version, every time I turned on the option of not dropping items when I died, it would be shut down after a few minutes and restarted. This caused me to die many times. I hope to alert the authorities!
my server run in Ubuntu Server 20.04,my client is Windows11
can confirm, also happening to me.
The bug is present in Linux. Steps to reproduce:
mine has issues as well. hope to get resolved asap
This remains present in 1.21.51.02 - Same steps as per the linux ones below duplicate the same problem. The problem is still with the gamerule Keepinventory.
I can confirm this issue is still present in 1.21.51.02 bedrock windows server. I can set the gamerule to true and it will remain set to True, until the server reboots (every morning at 4am for me) then its set to false again. Hopefully there is a fix soon!
Hello! Do you stop the server by entering the "Stop" command in the server console?
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 BDS Wiki – 📖 FAQs
I do not issue a stop command on the server console before stopping the server.
Note: Full disclosure, I'm running the Linux version, unlike the OP. As reported in other comments, the bug exists in that version too.
I do indeed issue a "stop" command on the server - I ensure that the server is cleanly shut down using this command every time.
To clarify:
This didn't used to happen until the 1.21.50 update
Yes. The issue of keep inventory disabling itself on any reboot is happening weather I type the stop command in the server console, or if it closes without typing stop in the server console. Either situation, I have to rerun ' /gamerule keepInventory true' whenever the server is restarted. This issue started with v1.21.50 for me and still present on 1.21.51.02
Same issue here, running bedrock server on Windows. keepinventory is always false when starting the server.
I found a way to temporarily solve the problem.
Use NBT editors (Or VS code with NBT viewer add-on) to open the level.dat file in the world folder, set cheatsEnabled to 1 and keepinventory to 1. Then no matter how you turn on or shut down the server, the keepinventory gamerule will not be closed. You can have a try.
Funnily enough, I've tried that and it didn't seem to work for me, even when I set the file to read only...
I also see this issue - when you restart BDS, keepInventory is toggled to false, even if no configuration changes are made. This is...inconvenient, to say the least, and a breaking change from previous behavior (where gamerules were kept between server restarts, even in hard mode).
Thank you for your report!
However, this issue has been temporarily resolved as Awaiting Response
Please add to your report Steps to Reproduce, Observed Results, and Expected Behavior in the Description, as shown here:
Steps to Reproduce:
1. (list every step carefully, so someone else can reproduce the issue, and try following your list to make sure you can still reproduce the issue yourself)
2.
3.
Observed Results:
(Briefly describe what happens)
Expected Results:
(Briefly describe what should happen)
This ticket will automatically reopen when you reply.
Steps to reproduce:
1. Start the Minecraft server
2. Run "Gamerule" - verify that "keepinventory" is set to "False"
3. Run "gamerule keepinventory true" - verify that the command was successful with the successful output
4. Run "gamerule" and verify that "keepinventory" is set to "true"
5. Issue a "stop" command and wait for the server to stop cleanly
6. Start the Minecraft server
7. Run "Gamerule" - verify that "keepinventory" is set to "False"
Observed Results:
The Minecraft server doesn't maintain "keepinventory" as true after a server restart. This has started since 1.21.50 and has persisted since subsequent updates. This did NOT happen prior to the update - "keepinventory" would persist as true after a server restart
Expected Results:
"keepinventory" should persist as true after a server restart as it used to do prior to 1.21.50
Is there an update on this at all as my server restarted itself and I lost a lot of inventory...
If you have a copy of the world available, you might like to upload a copy of it for investigation.
If the world is larger than 10MB you can upload the world to OneDrive or a similar file sharing site, and then share the link.
This isn't isolated to a single world and I can replicate this problem on any world I create. That said, this is a link to one of many worlds that I can replicate this problem on:
MinecraftSupport
This is an expiring link that will expire on the 13th February
This issue may only happen if you upgrade the world from old versions to 1.21.50. Worlds created after that version have no problem.
The world uploaded there was created as a fresh 1.21.50 version and has the same problem.
This was also a completely fresh build, not updated.
Thanks for providing a world - would it be possible to share it as a zip file please? (The way it was shared the files cannot be downloaded together.)
Please check now - I have zipped it