diff options
Diffstat (limited to 'patches/server/0377-Prevent-teleporting-dead-entities.patch')
-rw-r--r-- | patches/server/0377-Prevent-teleporting-dead-entities.patch | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/patches/server/0377-Prevent-teleporting-dead-entities.patch b/patches/server/0377-Prevent-teleporting-dead-entities.patch index f55c8fa69e..51fc4ad832 100644 --- a/patches/server/0377-Prevent-teleporting-dead-entities.patch +++ b/patches/server/0377-Prevent-teleporting-dead-entities.patch @@ -5,17 +5,20 @@ Subject: [PATCH] Prevent teleporting dead entities diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a0aa9be6ee16109c68c2c75b2a150982f2ab3d62..52448f75d093a4880ce619036af00c8a1772ad80 100644 +index a0aa9be6ee16109c68c2c75b2a150982f2ab3d62..3bfa07fb3f41752dc8de82afd78a48ccc9015664 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1495,6 +1495,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1495,6 +1495,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser } private void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) { ++ // Paper start + if (player.isRemoved()) { + LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName()); ++ if (server.isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Attempt to teleport removed player"); + return; + } ++ // Paper end // CraftBukkit start if (Float.isNaN(f)) { f = 0; |