Fix Per World Difficulty / Remembering Difficulty

Fixes per world difficulty with /difficulty command and also
makes it so that the server keeps the last difficulty used instead
of restoring the server.properties every single load.
This commit is contained in:
Aikar
2020-06-28 03:59:10 -04:00
parent 454ff5e5b9
commit 2e3c775b68
6 changed files with 99 additions and 57 deletions

View File

@@ -250,6 +250,15 @@
@Override
public boolean isSpawningMonsters() {
return this.settings.getProperties().spawnMonsters && super.isSpawningMonsters();
@@ -227,7 +337,7 @@
@Override
public void forceDifficulty() {
- this.setDifficulty(this.getProperties().difficulty, true);
+ // this.setDifficulty(this.getProperties().difficulty, true); // Paper - per level difficulty; Don't overwrite level.dat's difficulty, keep current
}
@Override
@@ -286,13 +396,14 @@
}