diff options
author | Riley Park <[email protected]> | 2021-02-21 11:45:33 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-21 20:45:33 +0100 |
commit | 4e958e229f9f448a10dbc610bab460dbf222902e (patch) | |
tree | b5029407506e181c4800c42920b7e01a78d06639 /Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch | |
parent | 1a973561167fe7eee67fb1590a7590f8d7166f2a (diff) | |
download | Paper-4e958e229f9f448a10dbc610bab460dbf222902e.tar.gz Paper-4e958e229f9f448a10dbc610bab460dbf222902e.zip |
We're going on an Adventure! (#4842)
Co-authored-by: Jake Potrebic <[email protected]>
Co-authored-by: zml <[email protected]>
Co-authored-by: Mariell Hoversholm <[email protected]>
Diffstat (limited to 'Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch')
-rw-r--r-- | Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch b/Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch new file mode 100644 index 0000000000..df3638c0b8 --- /dev/null +++ b/Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder <[email protected]> +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 a90b0caeaa2340ce78dbad773b257db0f108a4ed..5b42d6ff29dfd7415a8b89b36e8522ab4f5494ca 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; |