summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 670490d0..49e236d4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -261,6 +261,10 @@ public final class CraftServer implements Server {
return this.getConfigInt("server-port", 25565);
}
+ public int getViewDistance() {
+ return this.getConfigInt("view-distance", 10);
+ }
+
public String getIp() {
return this.getConfigString("server-ip", "");
}
@@ -273,6 +277,14 @@ public final class CraftServer implements Server {
return this.getConfigString("server-id", "unnamed");
}
+ public boolean getAllowNether() {
+ return this.getConfigBoolean("allow-nether", true);
+ }
+
+ public boolean hasWhitelist() {
+ return this.getConfigBoolean("white-list", false);
+ }
+
// NOTE: Temporary calls through to server.properies until its replaced
private String getConfigString(String variable, String defaultValue) {
return this.console.propertyManager.getString(variable, defaultValue);
@@ -282,6 +294,10 @@ public final class CraftServer implements Server {
return this.console.propertyManager.getInt(variable, defaultValue);
}
+ private boolean getConfigBoolean(String variable, boolean defaultValue) {
+ return this.console.propertyManager.getBoolean(variable, defaultValue);
+ }
+
// End Temporary calls
public String getUpdateFolder() {
@@ -676,6 +692,10 @@ public final class CraftServer implements Server {
return this.console.onlineMode;
}
+ public boolean getAllowFlight() {
+ return this.console.allowFlight;
+ }
+
public ChunkGenerator getGenerator(String world) {
ConfigurationNode node = configuration.getNode("worlds");
ChunkGenerator result = null;