2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-03-03 05:28:35 +00:00
|
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
|
|
Date: Tue, 3 Mar 2020 05:26:40 +0000
|
|
|
|
Subject: [PATCH] Prevent teleporting dead entities
|
|
|
|
|
|
|
|
|
2021-03-16 07:19:45 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
2021-05-24 22:37:30 +00:00
|
|
|
index 72df753d8c8e12cb3efaa02f37b05496701cc9f9..8a8f75acdd55e00ac2e7b5c621d1f522208df2c2 100644
|
2021-03-16 07:19:45 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
2021-05-24 22:37:30 +00:00
|
|
|
@@ -1470,6 +1470,10 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
2020-03-03 05:28:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<PacketPlayOutPosition.EnumPlayerTeleportFlags> set) {
|
|
|
|
+ if (player.dead) {
|
2020-03-06 23:29:13 +00:00
|
|
|
+ LOGGER.info("Attempt to teleport dead player {} restricted", player.getName());
|
2020-03-03 05:28:35 +00:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
// CraftBukkit start
|
|
|
|
if (Float.isNaN(f)) {
|
|
|
|
f = 0;
|