2020-05-02 00:03:47 +02:00
|
|
|
From 4d4e8a911ceec51125642a93a5351383e643c3d3 Mon Sep 17 00:00:00 2001
|
2020-03-03 06:28:35 +01:00
|
|
|
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
|
2020-05-02 00:03:47 +02:00
|
|
|
index 71d045ee00..2e81f3a1d9 100644
|
2020-03-03 06:28:35 +01:00
|
|
|
--- 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) {
|
2020-03-07 00:29:13 +01:00
|
|
|
+ LOGGER.info("Attempt to teleport dead player {} restricted", player.getName());
|
2020-03-03 06:28:35 +01:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
// CraftBukkit start
|
|
|
|
if (Float.isNaN(f)) {
|
|
|
|
f = 0;
|
|
|
|
--
|
2020-05-02 00:03:47 +02:00
|
|
|
2.26.2
|
2020-03-03 06:28:35 +01:00
|
|
|
|