[SPIGOT-169] gamerule keepInventory not save Created: 09/Dec/14  Updated: 10/Dec/14  Resolved: 10/Dec/14

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: fOox974 Assignee: Thinkofname
Resolution: Fixed Votes: 1
Labels: gamerule, keepInventory
Environment:

debian Squeeze, Java 8, spigot 1.8



 Description   

Hi,

When I do /gamerule keepInventory true
all are ok, but after restarting server, players lose their inventory in Nether and The_End world but no in World



 Comments   
Comment by Uwe Pfeifer [ 10/Dec/14 ]

i just did a java -jar BuildTools.jar and the new spigot version seems not to have this bug. the keepInventory is still true after a restart. if this happens again I will report back here.

Comment by Uwe Pfeifer [ 10/Dec/14 ]

yes it resets when i do /gamerule keepInventory it's set to false even though i set it to true before restart. Gamerule gets reset.

Comment by FearThe1337 [ 10/Dec/14 ]

Bukkits commands were all replaced with vanilla commands again yesterday. This is likely the reason for this difference.

Comment by Antony Riley [ 10/Dec/14 ]

Historical: Bukkit's gamerules have always been per world, last I heard they considered that this was a feature, not a bug.

From reading the code:

/bukkit:gamerule : sets gamerules per world, in order to set a gamerule you must be in the right world, if you do it from the console it only changes the first world.
/minecraft:gamerule: sets gamerules only on the primary world.

Done a little testing, and gamerules are not saving for me except on the primary world, will do some poking and maybe send a PR if I find it.

Comment by FearThe1337 [ 10/Dec/14 ]

Verify it does actually reset using the command:

/gamerule keepInventory.

Would make it clear if gamerules actually get reset or if its a bug causing players to not keep their inventories.

Comment by Uwe Pfeifer [ 10/Dec/14 ]

This server is running CraftBukkit version git-Spigot-d5bf866-917e46a (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)

I tried moving all plugins to a subdirectory called moved/ and now it still happens. but when i set up a completely new server, it didnt happen.

Comment by FearThe1337 [ 10/Dec/14 ]

What is your version of spigot? Also have you tried without plugins?

Comment by Uwe Pfeifer [ 10/Dec/14 ]

for me it doesnt also when i run it in the nether

Comment by FearThe1337 [ 10/Dec/14 ]

Saved perfectly fine for me. However, the default minecraft command is being used which does not distinguish between worlds. So setting it in the main, nether or end all affects each other!

Comment by Uwe Pfeifer [ 09/Dec/14 ]

yes this happens when doing /gamerule keepInventory true while beeing in the nether. after a restart its set to false again.

Comment by Uwe Pfeifer [ 09/Dec/14 ]

i think this should work like before without multiverse also we want to set it to true but it keeps getting reset to false.

Comment by Antony Riley [ 09/Dec/14 ]

A possible worldaround would be to use multiverse and /mv gamerule keepInventory false on all the worlds you want to set this flag on.

Comment by Uwe Pfeifer [ 09/Dec/14 ]

i got the same problem. /gamerule keepInventory true is reset to false after server restart for world_nether.

Comment by fOox974 [ 09/Dec/14 ]

I try to /gamerule in the nether too and having the same issue :/

Comment by Ethan (Dead-i) [ 09/Dec/14 ]

If you run the command while you are in the Nether, does this then work for the Nether as well? The gamerule is per-world. The Overworld, Nether and the End count as different worlds in this respect, and it has always been like this, to my knowledge.

Comment by SpigotMC [ 09/Dec/14 ]

Your build is not the latest and therefor may be the reason you are having this issue. Spigot is 2 version(s) behind. CraftBukkit is 2 version(s) behind. This message was automatically generated and is not guaranteed to be a solution to your issue.

Generated at Mon Dec 15 05:23:21 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.