Paper/Spigot-Server-Patches/0442-Prevent-teleporting-dead-entities.patch
Aikar 586ee2bb11
Remove patch for MC-111480, fixed in 1.14
We were now starting entities at ID 2
2020-04-11 20:39:21 -04:00

25 Zeilen
985 B
Diff

From 2cd566c1bfc56f87f20708d45bac4b5210473d75 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/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 108377d76e..7929fcc800 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1209,6 +1209,10 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
private void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<PacketPlayOutPosition.EnumPlayerTeleportFlags> set) {
+ if (player.dead) {
+ LOGGER.info("Attempt to teleport dead player {} restricted", player.getName());
+ return;
+ }
// CraftBukkit start
if (Float.isNaN(f)) {
f = 0;
--
2.25.1