mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
22 lines
1.1 KiB
Diff
22 lines
1.1 KiB
Diff
|
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
|
||
|
index 2b79413bb8a592a7b7093e11d3a0cce895286c8f..09a663cc53cdf8ae45352b280200c8170dbbcdfc 100644
|
||
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||
|
@@ -1468,6 +1468,10 @@ public class ServerGamePacketListenerImpl implements ServerGamePacketListener {
|
||
|
}
|
||
|
|
||
|
private void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set) {
|
||
|
+ if (player.removed) {
|
||
|
+ LOGGER.info("Attempt to teleport dead player {} restricted", player.getScoreboardName());
|
||
|
+ return;
|
||
|
+ }
|
||
|
// CraftBukkit start
|
||
|
if (Float.isNaN(f)) {
|
||
|
f = 0;
|