Archiviert
13
0

Prevent teleporting dead entities (#2803)

Dieser Commit ist enthalten in:
Shane Freeder 2020-03-03 05:28:35 +00:00
Ursprung 5ce1dd48e1
Commit ccf1d5908f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C
2 geänderte Dateien mit 29 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From 1735e9e48b344eb98d739f46cda33177ba37107e Mon Sep 17 00:00:00 2001
From eeb73f0f817591d7385cc0db9bcc91e7b800f1f9 Mon Sep 17 00:00:00 2001
From: Trigary <trigary0@gmail.com>
Date: Sun, 1 Mar 2020 22:43:34 +0100
Subject: [PATCH] add hand to BlockMultiPlaceEvent
@ -29,3 +29,4 @@ index fe2ec79dd..8460aa4f5 100644
/**
--
2.25.0

Datei anzeigen

@ -0,0 +1,24 @@
From f884e53d1700a3a0574ddb50a6400e50706d752e 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 108377d76..c6bd62392 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1209,6 +1209,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 %s restricted", player.getName());
+ return;
+ }
// CraftBukkit start
if (Float.isNaN(f)) {
f = 0;
--
2.25.0