From 29705a0d4f65440b4d91cba67d63bbac884a833e Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 22 Mar 2018 21:05:34 +1100 Subject: [PATCH] SPIGOT-3864: Protect against suffocation on world change --- nms-patches/PlayerList.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nms-patches/PlayerList.patch b/nms-patches/PlayerList.patch index c61f54fd05..ddd3b4d0e3 100644 --- a/nms-patches/PlayerList.patch +++ b/nms-patches/PlayerList.patch @@ -621,7 +621,7 @@ + exitWorld.getTravelAgent().adjustExit(entityplayer, exit, velocity); + + entityplayer.worldChangeInvuln = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds -+ this.moveToWorld(entityplayer, exitWorld.dimension, true, exit, false); // Vanilla doesn't check for suffocation when handling portals, so neither should we ++ this.moveToWorld(entityplayer, exitWorld.dimension, true, exit, true); // SPIGOT-3864 + if (entityplayer.motX != velocity.getX() || entityplayer.motY != velocity.getY() || entityplayer.motZ != velocity.getZ()) { + entityplayer.getBukkitEntity().setVelocity(velocity); + }