TritonDataCenter / minecrab

Minecraft on Joyent's Cloud & Manta on Demand
Other
27 stars 12 forks source link

Make gamemode/difficulty settings persist between reboots #31

Open nfitch opened 10 years ago

nfitch commented 10 years ago

So if the gamemode and difficulty is changed while a server is up, the server.properties file isn't updated. It's an open question whether the gamemode/difficulty is persisted in the game files.

nfitch commented 10 years ago

Doesn't persist to the server.properties file on shutdown.

nfitch commented 10 years ago

So I spun up a server, set the default gamemode and set my own gamemode to creative. On server shutdown and reboot I went back to being in survival mode. So... we do need to have server properties editing for gamemode and difficulty. It will probably need to do this for setting the game mode:

  1. Set 'gamemode=[0-2]' in server.properties in manta and on the server
  2. Command 'defaultgamemode [0-2]' to the server.
  3. For each logged in player, command 'gamemode [0-2] [player]'
  4. Upload the server.properties (so that the ui reflects current state)

And for the difficulty:

  1. Set 'difficulty=[0-3]' in server.properties in manta and on the server
  2. Upload the server.properties (so that the ui reflects current state)