mojira.dev
MC-144591

Server set to difficulty in server.properties after every restart

When I restart my server, the difficulty is automatically set to peaceful. 

Linked issues

Comments 5

Can confirm this is still an issue in the 1.14 release - The server.properties defaults to Peaceful either on server startup (if the server was offline when the server.properties was edited) or automatically shortly after saving the file if the server is online at the time.

 

Tested in multiple environments on old and new servers on 1.14 and they all seem to do this for me.

 

The '/difficulty' command correctly shows the set difficulty however.

Confirmed for 1.14.1

Could it be that accepting string names for difficulty in server.properties now can lead to a problem? Like failed conversion from string to integer for non-default strings, ending up with 0 (peaceful)?

Can you give more specific instructions on how to reproduce?

What is your server.properties set to when you run the server before and after? What are you doing in game to change the difficulty and what are you setting it to? What are you expecting to happen? What is actually happening? I cannot find any difference between what's happening in 1.14 and what happened in 1.13.2.

I cannot find any issues with upgrading from a 1.13.2 server to a 1.14 server either, the difficulty in the server.properties is correctly upgraded.

Romain

coschevi

Confirmed

UI

Minecraft 19w08a, Minecraft 1.14, Minecraft 1.14.1

Retrieved