mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-04 01:39:54 +01:00
1718f61bf8
Doesn't compile yet. CraftBukkit Changes: 90d6905b Repackage NMS 69cf961d Repackage patches Spigot Changes: 79d53c28 Repackage NMS
22 lines
1.0 KiB
Diff
22 lines
1.0 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 fef5b401a168c5b2be26c834e03b014d6231daf9..31fb6eda544568b14255aede0a981d065bdf3aee 100644
|
|
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
|
@@ -1467,6 +1467,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;
|