summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2012-08-05 20:03:12 -0500
committerTravis Watkins <amaranth@ubuntu.com>2012-08-05 20:03:12 -0500
commita574ec54cc68710e6949d462c4571c87d2c7e37a (patch)
treec587fc3167b3e55855f7f4db9410c835500d0660 /src/main
parentbeb71069b71be1474ba1d9b18310812e094dc74e (diff)
downloadcraftbukkit-a574ec54cc68710e6949d462c4571c87d2c7e37a.tar
craftbukkit-a574ec54cc68710e6949d462c4571c87d2c7e37a.tar.gz
craftbukkit-a574ec54cc68710e6949d462c4571c87d2c7e37a.tar.lz
craftbukkit-a574ec54cc68710e6949d462c4571c87d2c7e37a.tar.xz
craftbukkit-a574ec54cc68710e6949d462c4571c87d2c7e37a.zip
Put forceChunkLoad back to its original value.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java b/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java
index f1d2cd3a..47a3c787 100644
--- a/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java
+++ b/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java
@@ -24,7 +24,10 @@ public class PortalTravelAgent implements TravelAgent {
public Location findOrCreate(Location location) {
WorldServer worldServer = ((CraftWorld) location.getWorld()).getHandle();
- worldServer.chunkProviderServer.forceChunkLoad = true;
+ boolean wasEnabled = worldServer.chunkProviderServer.forceChunkLoad;
+ if (!wasEnabled) {
+ worldServer.chunkProviderServer.forceChunkLoad = true;
+ }
// Attempt to find a Portal.
Location resultLocation = this.findPortal(location);
// If a Portal cannot be found we will attempt to create one.
@@ -38,7 +41,10 @@ public class PortalTravelAgent implements TravelAgent {
resultLocation = location;
}
}
- worldServer.chunkProviderServer.forceChunkLoad = false;
+
+ if (!wasEnabled) {
+ worldServer.chunkProviderServer.forceChunkLoad = false;
+ }
// Return our resulting portal location.
return resultLocation;
}