mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 11:42:55 +01:00
41e6073ced
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: afa0678e1 SPIGOT-6133: Chorus fruit consumption calls PlayerTeleportEvent multiple times
21 lines
1 KiB
Diff
21 lines
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/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
index 72df753d8c8e12cb3efaa02f37b05496701cc9f9..8a8f75acdd55e00ac2e7b5c621d1f522208df2c2 100644
|
|
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
@@ -1470,6 +1470,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) {
|
|
+ LOGGER.info("Attempt to teleport dead player {} restricted", player.getName());
|
|
+ return;
|
|
+ }
|
|
// CraftBukkit start
|
|
if (Float.isNaN(f)) {
|
|
f = 0;
|