mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
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/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
index 204eae3abdb006c3006537e6cf8f4c7a0bae2a47..651ecb50c2b06ca81cb9a2286d77fd41a17b5140 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -1239,6 +1239,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;
|