aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches-Unmapped/0413-Prevent-teleporting-dead-entities.patch
diff options
context:
space:
mode:
authorKyle Wood <[email protected]>2021-04-24 17:01:33 -0500
committerKyle Wood <[email protected]>2021-04-25 18:37:43 -0500
commit3093b81fee3064603c368ab934eddf66ce304433 (patch)
treecb99f05b5f31de92c41af4cc40b4bef5f3cbf573 /Spigot-Server-Patches-Unmapped/0413-Prevent-teleporting-dead-entities.patch
parent1af696a05d21cbdd7b5a7170f95598c013257588 (diff)
downloadPaper-3093b81fee3064603c368ab934eddf66ce304433.tar.gz
Paper-3093b81fee3064603c368ab934eddf66ce304433.zip
Move patches
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0413-Prevent-teleporting-dead-entities.patch')
-rw-r--r--Spigot-Server-Patches-Unmapped/0413-Prevent-teleporting-dead-entities.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0413-Prevent-teleporting-dead-entities.patch b/Spigot-Server-Patches-Unmapped/0413-Prevent-teleporting-dead-entities.patch
new file mode 100644
index 0000000000..29dc1ca8f1
--- /dev/null
+++ b/Spigot-Server-Patches-Unmapped/0413-Prevent-teleporting-dead-entities.patch
@@ -0,0 +1,21 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+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/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
+index cfdfa3ea95a525af25c7aa830f8e31d5afe56d65..f02ddd53df4674a2b5e0bb142db756d1f153d69b 100644
+--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
++++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
+@@ -1469,6 +1469,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;