diff options
Diffstat (limited to 'patches/server/0558-Add-PlayerKickEvent-causes.patch')
-rw-r--r-- | patches/server/0558-Add-PlayerKickEvent-causes.patch | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/patches/server/0558-Add-PlayerKickEvent-causes.patch b/patches/server/0558-Add-PlayerKickEvent-causes.patch index d78dcaaee0..8bf3ee985a 100644 --- a/patches/server/0558-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0558-Add-PlayerKickEvent-causes.patch @@ -95,7 +95,7 @@ index d1caaecfdfba1cdeba032f0bc38c06541fa61633..6468b3a25c7527a2fde6899e4812b5cb i++; } diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 2872bef40440b11a206c3ec88e2c6d95cd1a72e9..0273998b72c9d8a1e7de4b1195c547001922cb8e 100644 +index 2872bef40440b11a206c3ec88e2c6d95cd1a72e9..dde1d3850af610241e1f76a194efe1a58dc96bd5 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java @@ -127,7 +127,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @@ -143,6 +143,15 @@ index 2872bef40440b11a206c3ec88e2c6d95cd1a72e9..0273998b72c9d8a1e7de4b1195c54700 } // Paper start - adventure pack callbacks // call the callbacks before the previously-existing event so the event has final say +@@ -237,7 +237,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + return; + } + // CraftBukkit end +- this.disconnect(ServerCommonPacketListenerImpl.DISCONNECT_UNEXPECTED_QUERY); ++ this.disconnect(ServerCommonPacketListenerImpl.DISCONNECT_UNEXPECTED_QUERY, org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_COOKIE); // Paper - kick event cause + } + + protected void keepConnectionAlive() { @@ -249,7 +249,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack if (!this.isSingleplayerOwner() && elapsedTime >= KEEPALIVE_LIMIT) { // Paper - check keepalive limit, don't fire if already disconnected |