summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2011-10-03 10:08:38 -0400
committerEvilSeph <evilseph@gmail.com>2011-10-03 10:53:17 -0400
commit11b388ff39abaead7bf0349b99c12a2fbb236a86 (patch)
tree604655551894dd4365753d3df5eb428ecd189dd6 /src/main/java/org/bukkit
parent7c5007c0165fc474ade015cfd9c1def26f12b462 (diff)
downloadcraftbukkit-11b388ff39abaead7bf0349b99c12a2fbb236a86.tar
craftbukkit-11b388ff39abaead7bf0349b99c12a2fbb236a86.tar.gz
craftbukkit-11b388ff39abaead7bf0349b99c12a2fbb236a86.tar.lz
craftbukkit-11b388ff39abaead7bf0349b99c12a2fbb236a86.tar.xz
craftbukkit-11b388ff39abaead7bf0349b99c12a2fbb236a86.zip
Fixed multiworld difficulty.
World difficulty was incorrectly being set to 0 or 1 on reload depending on spawn-monsters instead of the difficulty server property.
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2035ace4..400c5b45 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -372,6 +372,7 @@ public final class CraftServer implements Server {
boolean animals = config.getBoolean("spawn-animals", console.spawnAnimals);
boolean monsters = config.getBoolean("spawn-monsters", console.worlds.get(0).difficulty > 0);
+ int difficulty = config.getInt("difficulty", console.worlds.get(0).difficulty);
console.onlineMode = config.getBoolean("online-mode", console.onlineMode);
console.spawnAnimals = config.getBoolean("spawn-animals", console.spawnAnimals);
@@ -379,7 +380,7 @@ public final class CraftServer implements Server {
console.allowFlight = config.getBoolean("allow-flight", console.allowFlight);
for (WorldServer world : console.worlds) {
- world.difficulty = monsters ? 1 : 0;
+ world.difficulty = difficulty;
world.setSpawnFlags(monsters, animals);
}