Prevent teleporting dead entities (#2803)
Dieser Commit ist enthalten in:
Ursprung
5ce1dd48e1
Commit
ccf1d5908f
@ -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
|
||||
|
||||
|
24
Spigot-Server-Patches/0445-Prevent-teleporting-dead-entities.patch
Normale Datei
24
Spigot-Server-Patches/0445-Prevent-teleporting-dead-entities.patch
Normale Datei
@ -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
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren