diff --git a/patches/server/0004-Leaves-Server-Config-And-Command.patch b/patches/server/0004-Leaves-Server-Config-And-Command.patch index e993b064..16c5b860 100644 --- a/patches/server/0004-Leaves-Server-Config-And-Command.patch +++ b/patches/server/0004-Leaves-Server-Config-And-Command.patch @@ -128,10 +128,10 @@ index 35d2da9d91dcdd89de7c0f4af028fd182376ea8d..d73482fb1e71fe2951e96ae0593de268 .withRequiredArg() diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..d1a6bd01cb03424e0bdac98127dada77b3d11ea2 +index 0000000000000000000000000000000000000000..5ca9ffe8747ef9e8bd2936402e2f7201ec3a5762 --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -0,0 +1,881 @@ +@@ -0,0 +1,886 @@ +package top.leavesmc.leaves; + +import com.destroystokyo.paper.util.SneakyThrow; @@ -838,6 +838,11 @@ index 0000000000000000000000000000000000000000..d1a6bd01cb03424e0bdac98127dada77 + optimizeNoiseGeneration = getBoolean("settings.performance.optimize-noise-generation", optimizeNoiseGeneration); + } + ++ public static boolean disablePacketLimit = false; ++ private static void disablePacketLimit() { ++ disablePacketLimit = getBoolean("settings.modify.disable-packet-limit", disablePacketLimit); ++ } ++ + public static final class WorldConfig { + + public final String worldName; diff --git a/patches/server/0098-Disable-packet-limit.patch b/patches/server/0098-Disable-packet-limit.patch new file mode 100644 index 00000000..68a47830 --- /dev/null +++ b/patches/server/0098-Disable-packet-limit.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: violetc <58360096+s-yh-china@users.noreply.github.com> +Date: Wed, 19 Jul 2023 19:59:58 +0800 +Subject: [PATCH] Disable packet limit + + +diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +index cacd808f1d03c9729bcf2110bffceb940c0e11c0..adebf345e433904ab095fe40eb3053e9512c7d8f 100644 +--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java ++++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +@@ -204,7 +204,7 @@ public class GlobalConfiguration extends ConfigurationPart { + } + + public boolean isEnabled() { +- return this.interval > 0.0 && this.maxPacketRate > 0.0; ++ return !top.leavesmc.leaves.LeavesConfig.disablePacketLimit && (this.interval > 0.0 && this.maxPacketRate > 0.0); // Leaves - disable packet limit + } + + public enum ViolateAction {