mojira.dev
MC-2631

/defaultgamemode not changing tag on world selection screen

If I open a new World, for ex. in Survival, and change the gamemode ingame to Creative, and leave then the game, then in the world selection there is the default gamemode.

Linked issues

Attachments

Comments 13

Orion Humphrey

This also happens with the difficulty. If you have it set to hard in the options but then change it to peaceful with command blocks or whatever then it will revert to hard when reloading the world.

Not a bug. This is because you are setting the local gamemode of the player, not the world.
If you want to modify the world gamemode, you'll have to modify the NBT tag for it, or use /defaultgamemode, but the latter doesn't modify the world difficulty tag.
Similarly, difficulty doesn't stay because the user has the right to reset the difficulty using the GUI settings. If you really want to force your players to play in a certain difficulty, hook up the command block to a redstone clock.

No, it is an issue. I just tried it, and with /defaultgamemode 1, there is a "Survival Mode" in the world selection..

Yes, I just said that using /defaultgamemode does not change the tag, but that is a separate issue. The one being discussed above is using the /gamemode command, which is different - look at his chat and you'll see that's the response for /gamemode, not /defaultgamemode. However, /defaultgamemode should change the tag, so that is a bug, but this is not.

Please do not select the future version as you do not have it yet.

3 more comments
Orion Humphrey

In 14w04b

confirmed in 14w20b

Confirmed for 14w30c. Not only does it not change the tag, it doesn't work entirely. You can see this by running the command and then going into an NBT editor.

Confirmed for 14w32d

Fixed in 15w46a

Ice Trailer

(Unassigned)

Confirmed

gamemode, screenshot

Minecraft 1.4.2, Minecraft 1.4.4, Snapshot 13w05b, Snapshot 13w07a, Minecraft 1.5.1, ..., Minecraft 14w32d, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.6, Minecraft 15w36d

Minecraft 15w46a

Retrieved