summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2011-08-07 20:25:46 -0400
committerEvilSeph <evilseph@gmail.com>2011-08-08 16:01:34 -0400
commit831d97c8de842cb5a90062fd4cdcfec4898dd93a (patch)
tree153d7fcbc7a058a601461150baa7b98f213993d7 /src
parent47453c6055a0083f503ce6c98181c11f86d0fb77 (diff)
downloadcraftbukkit-831d97c8de842cb5a90062fd4cdcfec4898dd93a.tar
craftbukkit-831d97c8de842cb5a90062fd4cdcfec4898dd93a.tar.gz
craftbukkit-831d97c8de842cb5a90062fd4cdcfec4898dd93a.tar.lz
craftbukkit-831d97c8de842cb5a90062fd4cdcfec4898dd93a.tar.xz
craftbukkit-831d97c8de842cb5a90062fd4cdcfec4898dd93a.zip
Added "getViewDistance()", "getAllowNether()", "hasWhitelist()" and "getAllowFlight()". Thanks robin0van0der0v!
Diffstat (limited to 'src')
-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;