From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shane Freeder 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 7c5c7e67dd8f1fdc726b2f2923f8d2e2bf864e6c..ff436b2424ebab9bc1e673b8f484e63d52d4940c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1234,6 +1234,10 @@ public class PlayerConnection implements PacketListenerPlayIn { } private void internalTeleport(double d0, double d1, double d2, float f, float f1, Set set) { + if (player.dead) { + LOGGER.info("Attempt to teleport dead player {} restricted", player.getName()); + return; + } // CraftBukkit start if (Float.isNaN(f)) { f = 0;