9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 23:09:34 +00:00
Files
LeavesMC/patches/server/0079-Disable-packet-limit.patch
2024-09-23 02:51:56 +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 53913dfa4d9b73862179dcdef080c7e3adfe3b0f..0d41f7561f11d11a69399c191881afa2abadd9ff 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -283,7 +283,7 @@ public class GlobalConfiguration extends ConfigurationPart {
}
public boolean isEnabled() {
- return this.interval > 0.0 && this.maxPacketRate > 0.0;
+ return !org.leavesmc.leaves.LeavesConfig.disablePacketLimit && (this.interval > 0.0 && this.maxPacketRate > 0.0); // Leaves - disable packet limit
}
public enum ViolateAction {