geforkt von Mirrors/Paper
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
|
||||
@ -11,7 +11,7 @@ index fe2ec79dd..8460aa4f5 100644
|
||||
@@ -18,9 +18,17 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class BlockMultiPlaceEvent extends BlockPlaceEvent {
|
||||
private final List<BlockState> states;
|
||||
|
||||
|
||||
+ @Deprecated // Paper
|
||||
public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) {
|
||||
- super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild);
|
||||
@ -25,7 +25,8 @@ index fe2ec79dd..8460aa4f5 100644
|
||||
this.states = ImmutableList.copyOf(states);
|
||||
+ //Paper end
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
--
|
||||
--
|
||||
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
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren