9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-22 08:29:22 +00:00
Files
LeavesMC/patches/server/0098-Disable-packet-limit.patch
2023-07-23 11:08:32 +08:00

20 lines
1.0 KiB
Diff

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 25b1f48a4821771643f5184088f589b7a986dc92..a00a0a8148107fae1f8a2dce671bb0d08d5ba886 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -212,7 +212,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 {