Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
I've noticed Lapayo touched some gamemode code, which brought an old question back to my mind. Why is there a per-player gamemode? Shouldn't gamemode be set per world, and only by the admins?
If I understand the current code, what we're trying to do is to change gamemode of the world to match the player's gamemode. So if a player with Creative mode happily flies around and another player logs in with Survival mode, the game suddenly changes to Survival and the first player dies by falling down? Doesn't seem right. Am I missing something here?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
I'm asking, why store gamemode with players *at all*? Players don't need gamemodes, they can't have different gamemodes in a single world, so it makes sense to have only a per-world gamemode.
Posts: 1,450
Threads: 53
Joined: Feb 2011
Thanks: 15
Given 120 thank(s) in 91 post(s)
07-13-2012, 10:47 PM
(This post was last modified: 07-13-2012, 10:51 PM by FakeTruth.)
Of course they can have different game modes.. I do this all the time in my regular server.
Many people play survival but I, as admin, fly around invincibly in creative mode. There are more players that have been promoted and can play in creative (I'm not the only one), but the regular players are all in survival mode.
EDIT:
I DO think however, that player gamemode should ONLY be stored when it's different from the world's gamemode otherwise when you decide to change a world's gamemode to something else, all old players will stay in the old gamemode and only the new players will go to the new gamemode.
Maybe store gamemode as "default" in such case.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
Ach so!
I understood it wrong. This actually makes sense. And yes, we need another state for players, then, "inherit from world".
Posts: 90
Threads: 8
Joined: Dec 2011
Thanks: 0
Given 4 thank(s) in 4 post(s)
HavenĀ“t thought about this issue. Now the gamemode is only saved, if it differs from the worlds gamemode.