From 20ddd83f9a7f5c068ab5c50466ecd6f9fb3f28aa Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 3 Feb 2013 00:32:07 +0000 Subject: [PATCH] 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. By: James Clarke --- .../main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index b6c7b1ce89..b0c23a06e3 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/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; }