Server difficulty does not persist over server restarts
When I execute `/difficulty peaceful` in the console, the difficulty changes but after a server restart it is reset back to easy. I have observed this on the vanilla server JAR as well as on the Spigot server.
As pointed out by Steve Hsu, it just reads the value set in the server.properties file on each launch. However, this is an inconsistency with the integrated server which saves the value.
Environment
Windows 10 Pro 10.0.21390
OpenJDK 16.0.1+9-24
Linked Issues
is duplicated by1
Created Issue:
Server difficulty does not persist over server restarts
When I execute `/difficulty peaceful` in the console, the difficulty changes but after a server restart it is reset back to easy. I have observed this on the vanilla server JAR as well as on the Spigot server.
Environment
Windows 10 Pro 10.0.21390
OpenJDK 16.0.1+9-24
When I execute `/difficulty peaceful` in the console, the difficulty changes but after a server restart it is reset back to easy. I have observed this on the vanilla server JAR as well as on the Spigot server.
When I execute `/difficulty peaceful` in the console, the difficulty changes but after a server restart it is reset back to easy. I have observed this on the vanilla server JAR as well as on the Spigot server.
As pointed out by Steve Hsu, it just reads the value set in the server.properties file on each launch. However, this is an inconsistency with the integrated server which saves the value.
is duplicated by
Thank you for your report!
We're tracking this issue in MC-229282, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
When the server restarts, it sets the difficulty according to server.properties: https://minecraft.fandom.com/wiki/Server.properties#difficulty
I don't think this is the best behaviour. I mean, the command works in single player, so why does the behaviour for the integrated server differ from the dedicated server's behaviour?
Generally, the command should actually change the value and write it back to the server.properties file when it is shutdown, no?