2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 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/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2021-11-24 10:01:27 +01:00
|
|
|
index 23f06b3a4c7471bd3081c5e9ee78707c26280bfd..97c67fe091b2042a3aa98cc53d5e1ea1163a0966 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2021-11-24 10:01:27 +01:00
|
|
|
@@ -1494,6 +1494,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
2021-06-14 00:05:18 +02:00
|
|
|
private void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) {
|
|
|
|
+ if (player.isRemoved()) {
|
|
|
|
+ LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName());
|
2021-06-11 14:02:28 +02:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
// CraftBukkit start
|
|
|
|
if (Float.isNaN(f)) {
|
|
|
|
f = 0;
|