diff options
Diffstat (limited to 'patches/server/0445-Limit-recipe-packets.patch')
-rw-r--r-- | patches/server/0445-Limit-recipe-packets.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0445-Limit-recipe-packets.patch b/patches/server/0445-Limit-recipe-packets.patch index 07d4663966..1738c2e123 100644 --- a/patches/server/0445-Limit-recipe-packets.patch +++ b/patches/server/0445-Limit-recipe-packets.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Limit recipe packets diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e03d49f10f624cf09b65f5c43afcc70c4ccb4900..caf21de44bf2a39e28080f9cb9a9f2c658964633 100644 +index d8cd5bcc8d8c07eb4582030ca2703f9171743bd8..291c85c823a24b86235bf7581761c1686f609b82 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -266,6 +266,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -31,7 +31,7 @@ index e03d49f10f624cf09b65f5c43afcc70c4ccb4900..caf21de44bf2a39e28080f9cb9a9f2c6 + // Paper start - auto recipe limit + if (!org.bukkit.Bukkit.isPrimaryThread()) { + if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { -+ this.server.scheduleOnMain(() -> this.disconnect(net.minecraft.network.chat.Component.translatable("disconnect.spam"))); ++ this.disconnect(net.minecraft.network.chat.Component.translatable("disconnect.spam")); + return; + } + } |