diff options
author | Spottedleaf <[email protected]> | 2022-07-03 14:55:56 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2022-07-03 14:55:56 -0700 |
commit | 41647af74caed955c1fd5b38d458ee59298ae5d4 (patch) | |
tree | 33e684c98755f11816b3cfee1e54f7c3433a2a6e /patches/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch | |
parent | ed79fc947a2ab46dd2d57a1c6948de27b20dbb24 (diff) | |
download | Paper-41647af74caed955c1fd5b38d458ee59298ae5d4.tar.gz Paper-41647af74caed955c1fd5b38d458ee59298ae5d4.zip |
Do not use worldgen executor for api profile completions
We cannot put blocking network I/O onto the worldgen threads,
this will crash the server if it stalls
Diffstat (limited to 'patches/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch')
-rw-r--r-- | patches/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch new file mode 100644 index 0000000000..397c546096 --- /dev/null +++ b/patches/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder <[email protected]> +Date: Tue, 22 Jun 2021 19:58:53 +0100 +Subject: [PATCH] Ensure disconnect for book edit is called on main + + +diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +index c8e99e115c0c40834cc73c8373bb757ea7e1e88f..83129a209741b42d98993d48f2d3f98183671707 100644 +--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -1146,7 +1146,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser + // Paper end + // CraftBukkit start + if (this.lastBookTick + 20 > MinecraftServer.currentTick) { +- this.disconnect("Book edited too quickly!", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause ++ server.scheduleOnMain(() -> this.disconnect("Book edited too quickly!", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION)); // Paper - kick event cause // Paper - Also ensure this is called on main + return; + } + this.lastBookTick = MinecraftServer.currentTick; |