summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2012-10-28 01:30:09 -0400
committerEvilSeph <evilseph@gmail.com>2012-10-28 01:55:27 -0400
commit784f9e31a8bb21adb6b354b8c05225bbac06dbb6 (patch)
tree1f5a22c4d7735a54c66148a2633c48278d279cab /src/main/java/net/minecraft/server
parent5fe8523023dc836ce6b2a29c369ca21e7a81e163 (diff)
downloadcraftbukkit-784f9e31a8bb21adb6b354b8c05225bbac06dbb6.tar
craftbukkit-784f9e31a8bb21adb6b354b8c05225bbac06dbb6.tar.gz
craftbukkit-784f9e31a8bb21adb6b354b8c05225bbac06dbb6.tar.lz
craftbukkit-784f9e31a8bb21adb6b354b8c05225bbac06dbb6.tar.xz
craftbukkit-784f9e31a8bb21adb6b354b8c05225bbac06dbb6.zip
Remove spawn-radius setting in bukkit.yml in favour of spawn-protection in
server.properties. Fixes BUKKIT-2657
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/DedicatedServer.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 5121cd61..0c748614 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -157,10 +157,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
// CraftBukkit start
- if (this.propertyManager.properties.containsKey("spawn-protection")) {
- log.info("'spawn-protection' in server.properties has been moved to 'settings.spawn-radius' in bukkit.yml. I will move your config for you.");
- this.server.setSpawnRadius(this.propertyManager.getInt("spawn-protection", 16));
+ if (this.server.getBukkitSpawnRadius() > -1) {
+ log.info("'settings.spawn-radius' in bukkit.yml has been moved to 'spawn-protection' in server.properties. I will move your config for you.");
this.propertyManager.properties.remove("spawn-protection");
+ this.propertyManager.getInt("spawn-protection", this.server.getBukkitSpawnRadius());
+ this.server.removeBukkitSpawnRadius();
this.propertyManager.savePropertiesFile();
}