diff options
author | EvilSeph <evilseph@gmail.com> | 2011-08-15 14:27:02 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2011-08-15 14:27:02 -0400 |
commit | 8ea590bbcc499cd82ec246d455604692c7b74445 (patch) | |
tree | bf6019e8d37fcf0699d930472a153a89f1625bad /src/main/java/org | |
parent | 12e377501ed7df16ce7e8de2bb99eed41d43fe4e (diff) | |
download | craftbukkit-8ea590bbcc499cd82ec246d455604692c7b74445.tar craftbukkit-8ea590bbcc499cd82ec246d455604692c7b74445.tar.gz craftbukkit-8ea590bbcc499cd82ec246d455604692c7b74445.tar.lz craftbukkit-8ea590bbcc499cd82ec246d455604692c7b74445.tar.xz craftbukkit-8ea590bbcc499cd82ec246d455604692c7b74445.zip |
Revert "Implements interface for changing the view distance."
Diffstat (limited to 'src/main/java/org')
3 files changed, 6 insertions, 56 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index ec5dbb77..5eb2bd53 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -275,6 +275,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", ""); } @@ -750,22 +754,6 @@ public final class CraftServer implements Server { return this.console.allowFlight; } - public int getViewDistance() { - return server.getViewDistance(); - } - - public void setViewDistance(int viewDistance) throws IllegalArgumentException{ - server.setViewDistance(viewDistance); - updateViewDistance(); - server.saveViewDistance(); - } - - public void updateViewDistance() { - for (World world : worlds.values()) { - ((CraftWorld) world).updateViewDistance(); - } - } - public ChunkGenerator getGenerator(String world) { ConfigurationNode node = configuration.getNode("worlds"); ChunkGenerator result = null; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index b527515f..ed09f0f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -811,24 +811,4 @@ public class CraftWorld implements World { } } } - - public int getViewDistance() { - return world.getViewDistance(); - } - - public void setViewDistance(int viewDistance) throws IllegalArgumentException{ - world.setViewDistance(viewDistance); - } - - public void resetViewDistance(){ - world.resetViewDistance(); - } - - public boolean isViewDistanceSet() { - return world.isViewDistanceSet(); - } - - public void updateViewDistance() { - world.updateViewDistance(); - } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index f3635357..c86d7e5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,7 @@ package org.bukkit.craftbukkit.entity; +import java.net.InetSocketAddress; +import java.net.SocketAddress; import net.minecraft.server.EntityHuman; import net.minecraft.server.EntityPlayer; import net.minecraft.server.Packet131; @@ -26,11 +28,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.map.MapView; -import java.net.InetSocketAddress; -import java.net.SocketAddress; - public class CraftPlayer extends CraftHumanEntity implements Player { - public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); } @@ -347,20 +345,4 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetPlayerTime() { setPlayerTime(0, true); } - - public void setViewDistance(int viewDistance) { - getHandle().setViewDistance(viewDistance); - } - - public int getViewDistance() { - return getHandle().getViewDistance(); - } - - public void resetViewDistance() { - getHandle().resetViewDistance(); - } - - public boolean isViewDistanceSet() { - return getHandle().isViewDistanceSet(); - } } |