[SPIGOT-7469] server.properties overriding all difficulty settings. Created: 29/Aug/23  Updated: 25/Dec/24

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Megan Ross Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Running the server on macOS Monterey Version 12.6.8 via Terminal.


Version: CraftBukkit version 3859-Spigot-94e187b-f70a7b6 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

Whatever setting is set in the server.properties file by way of difficulty, this setting will override any commands issued in game to change difficulty.

Example:

You set server.properties difficulty to peaceful, but then in-game you want to change the difficulty of The End to hard. You do /difficulty hard in the end, but the difficulty in server.properties overrides this and disallows mobs from spawning, despite issuing commands to allow for it. All other settings allow for mobs to spawn, but that one difficulty setting is overriding it all.

 

This was not the case prior to 1.20. You used to be able to have the server.properties difficulty set to whatever you wanted, and then be able to change the difficulty in game per-world as, presumably, intended.



 Comments   
Comment by Megan Ross [ 07/Sep/23 ]

I just double-checked my version, "This server is running CraftBukkit version 3859-Spigot-94e187b-f70a7b6 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT)"

After a server restart, the difficulty in my worlds goes back to whatever is in the server.properties file. If I change the difficulty in game, the difficulty change is reflected immediately, but after a server restart it just goes back to whatever is defined in that file. The only exception to this seems to be when it's peaceful, in which case it does not allow me to change the difficulty at all. It prevents me from being able to spawn mobs and on server restart keeps peaceful as the difficulty.

Strange that your tests provided different results. Perhaps something happened to cause this during my server update? I have tried removing all plugins and the issue persists.

Comment by Joel Strasser [ 07/Sep/23 ]

I tested the behavior on 1.19.4 and 1.20.1 the were identical.

  • I started up the server
  • Shut it down
  • Set difficulty=peaceful in server.properties
  • Went into the end set difficulty to hard with /difficulty hard
  • After a restart The End's difficulty was hard
Generated at Sat Apr 05 10:22:58 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.