From f7649724fec56980b526e4d7fe4e9908df532740 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Fri, 9 Dec 2011 18:55:36 +0100 Subject: [PATCH] Implemented CraftServer.getAllowEnd(). Thanks codename-B! --- src/main/java/net/minecraft/server/MinecraftServer.java | 8 +++++++- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 4 ++++ src/main/resources/configurations/bukkit.yml | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 91ea00d4ea..d840216c96 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -223,7 +223,13 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe } if (k == 2) { - dimension = 1; + // CraftBukkit start (+ don't do this in server.properties, do it in bukkit.yml) + if (this.server.getAllowEnd()) { + dimension = 1; + } else { + continue; + } + // CraftBukkit end } String worldType = Environment.getEnvironment(dimension).toString().toLowerCase(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index a70d1b3d07..6e237be797 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -309,6 +309,10 @@ public final class CraftServer implements Server { return this.getConfigString("server-id", "unnamed"); } + public boolean getAllowEnd() { + return this.configuration.getBoolean("settings.allow-end"); + } + public boolean getAllowNether() { return this.getConfigBoolean("allow-nether", true); } diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml index 1cb52851d1..3dc5707dba 100644 --- a/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml @@ -14,6 +14,7 @@ settings: + allow-end: true spawn-radius: 16 permissions-file: permissions.yml update-folder: update