aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0377-Prevent-teleporting-dead-entities.patch
diff options
context:
space:
mode:
authorShane Freeder <[email protected]>2021-12-29 15:05:23 +0000
committerShane Freeder <[email protected]>2021-12-29 15:06:51 +0000
commit6852c657cd09ed0d722df0437c2fed13f549c30f (patch)
tree797ed53c3aa84b169f9d7e3dff24037e5dbb1853 /patches/server/0377-Prevent-teleporting-dead-entities.patch
parent7d48a46bc295e12426d4a7b5530448ef6a45bd3e (diff)
downloadPaper-6852c657cd09ed0d722df0437c2fed13f549c30f.tar.gz
Paper-6852c657cd09ed0d722df0437c2fed13f549c30f.zip
Add debug stack for removed player teleporation check
Diffstat (limited to 'patches/server/0377-Prevent-teleporting-dead-entities.patch')
-rw-r--r--patches/server/0377-Prevent-teleporting-dead-entities.patch7
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;