Paper/patches/server/0383-Prevent-teleporting-dead-entities.patch
MiniDigger 4104545b11 remove system property for book size limits
"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."
2021-06-17 21:12:40 +02:00

22 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 3 Mar 2020 05:26:40 +0000
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 f0c22ac0765cf3efa105f99c3f5c4ca3243914eb..fae06882217adf20c6f81db2793ee3930cba30c0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1500,6 +1500,10 @@ 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) {
+ if (player.isRemoved()) {
+ LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName());
+ return;
+ }
// CraftBukkit start
if (Float.isNaN(f)) {
f = 0;