geforkt von Mirrors/Paper
7ef05fbd8a
CB blindly drops any update flags when recording block modifications, this causes the debug stick to blindly update neighbouring blocks on usage in order to control this, we will special case this item, however, this ideally should be fixed by recording the actual update flags used, but will induce ABI breaks... This patch also maintains the behavior of the BlockPlaceEvent, this behavior will NOT be guaranteed in the future, however.
22 Zeilen
1.0 KiB
Diff
22 Zeilen
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 a6b83cb349386ff1fb6f3267f0d610bf31df3f16..e61efeccd4d9fc8ff55c2c914158e5982222ba74 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -1319,6 +1319,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;
|