summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorJames Clarke <jamesrtclarke@me.com>2013-02-03 00:32:07 +0000
committerfeildmaster <admin@feildmaster.com>2013-02-04 18:53:05 -0600
commit4d3865a03639eac0da60cd830ba4feee0bb53121 (patch)
treed2718d6d81f810144c34f8e822b1e68a59c2140c /src/main/java/org
parentd661c67a7042970785132138673320ea1de3f343 (diff)
downloadcraftbukkit-4d3865a03639eac0da60cd830ba4feee0bb53121.tar
craftbukkit-4d3865a03639eac0da60cd830ba4feee0bb53121.tar.gz
craftbukkit-4d3865a03639eac0da60cd830ba4feee0bb53121.tar.lz
craftbukkit-4d3865a03639eac0da60cd830ba4feee0bb53121.tar.xz
craftbukkit-4d3865a03639eac0da60cd830ba4feee0bb53121.zip
Fix players spawning above portals. Fixes BUKKIT-3542.
Vanilla does not check for blocks in which the player could suffocate when changing dimension, so portals will happily spawn players in blocks when using a portal under certain circumstances. However, we currently check for these instances and move the player up until they will not suffocate. This means that players can sometimes be taken to above the target portal, making it seem as if a portal was not created. Instead, we now disable this suffocation check when moveToWorld is called from changeDimension, mirroring vanilla behavior more accurately.
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b6c7b1ce..b0c23a06 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -389,7 +389,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (getHandle().activeContainer != getHandle().defaultContainer){
getHandle().closeInventory();
}
- server.getHandle().moveToWorld(entity, toWorld.dimension, true, to);
+ server.getHandle().moveToWorld(entity, toWorld.dimension, true, to, true);
}
return true;
}