summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/MinecraftServer.java
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-06-17 04:49:58 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-06-17 04:49:58 +0100
commit7aadc3d666e7e67887eca5cbfafe7911aaf2ab11 (patch)
tree37ed8e79a259a74a19109105e200aabb4372ad57 /src/main/java/net/minecraft/server/MinecraftServer.java
parentc0244eda04e367b65bb33bf9971686bfb4e74e21 (diff)
downloadcraftbukkit-7aadc3d666e7e67887eca5cbfafe7911aaf2ab11.tar
craftbukkit-7aadc3d666e7e67887eca5cbfafe7911aaf2ab11.tar.gz
craftbukkit-7aadc3d666e7e67887eca5cbfafe7911aaf2ab11.tar.lz
craftbukkit-7aadc3d666e7e67887eca5cbfafe7911aaf2ab11.tar.xz
craftbukkit-7aadc3d666e7e67887eca5cbfafe7911aaf2ab11.zip
Moved spawn-protection from server.properties into (settings.)spawn-radius in bukkit.yml
Diffstat (limited to 'src/main/java/net/minecraft/server/MinecraftServer.java')
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index eaee7e23..8df7fb45 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -50,7 +50,6 @@ public class MinecraftServer implements Runnable, ICommandListener {
public boolean o;
// CraftBukkit start
- public int spawnProtection;
public List<WorldServer> worlds = new ArrayList<WorldServer>();
public CraftServer server;
public OptionSet options;
@@ -100,7 +99,6 @@ public class MinecraftServer implements Runnable, ICommandListener {
this.spawnAnimals = this.propertyManager.getBoolean("spawn-animals", true);
this.pvpMode = this.propertyManager.getBoolean("pvp", true);
this.o = this.propertyManager.getBoolean("allow-flight", false);
- this.spawnProtection = this.propertyManager.getInt("spawn-protection", 16); // CraftBukkit - Configurable spawn protection start
InetAddress inetaddress = null;
if (s.length() > 0) {
@@ -149,8 +147,13 @@ public class MinecraftServer implements Runnable, ICommandListener {
long elapsed = System.nanoTime() - j;
String time = String.format("%.3fs", elapsed / 10000000000.0D);
log.info("Done (" + time + ")! For help, type \"help\" or \"?\"");
- // CraftBukkit end
+ 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.");
+ server.setSpawnRadius(this.propertyManager.getInt("spawn-protection", 16));
+ this.propertyManager.properties.remove("spawn-protection");
+ this.propertyManager.b();
+ }
return true;
}