Due to the changes made recently, gamemode and defaultgamemode have become extremely inconsistent, inconvenient and incomprehensible. I am going to explain all the different scenarios that cause unexpected behavior in a series of tickets after I lay down the expected behavior. These were all covered in a single ticket by another user, which was resolved because it was invalid due to multiple bugs in one ticket.
Terminology
World visibility state
Singleplayer: A world that is created through singleplayer world creation, is NOT open to LAN only housing a single player.
Open to LAN: A world that is created through singleplayer world creation, but is opened to LAN. It houses 1 or more players.
Multiplayer: A world that is created through dedicated server multiplayer world creation. It houses 0 or more players.
Gamemode state
(Player) Gamemode: The gamemode of an individual player.
Default Gamemode: the default gamemode of the world which is traditionally modified with
/defaultgamemodeand shows up on the level select screen in singleplayer. (or inserver.properties > gamemode=<GAMEMODE>for servers)LAN Gamemode: the temporary default gamemode which applies only in Open to LAN worlds to other players.
Forced Gamemode: the gamemode to switch players to upon joining. Found in
server.properties force-gamemode=<bool>
Expected
as a host player, changing my own gamemode during open to LAN session should not change the defaultgamemode/open to lan gamemode. any guest players joining should not copy my gamemode, but follow the open-to-lan override/defaultgamemode.
Actual
Changing the hostβs gamemode during an open to LAN session modifies the open-to-lan gamemode (if it wasnβt modified) as well as the default gamemode. If I changed the open-to-lan gamemode, it will seemingly no longer change this through /defaultgamemode or /gamemode. (not expected)
ANY PLAYER INCLUDING GUESTS and datapacks could run
/gamemodefor the host, thus changing the defaultgamemode through proxy.
Please check the attached video. It explains many of the issues found in the post I am copying from (but not all), as it visually shows many of these scenarios. Minecraft Game Modes Are More Complex Than Quantum Mechanics...
Thank you for your report!
We're tracking this issue in MC-308699, so this ticket is being resolved and linked as a Duplicate.
If you would like to add a vote and any extra information to the main ticket, it would be appreciated.
If you haven't already, please make use of the search feature to see if an issue you are about to report has already been reported.
Quick Links:
π Bug Tracker Guidelines β π¬ Community Support β π§ Mojang Support (Technical Issues) β π§ Microsoft Support (Account Issues)
π Project Summary β βοΈ Feedback and Suggestions β π Game Wiki