9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 18:09:17 +00:00
This commit is contained in:
Dreeam
2025-03-28 16:22:53 -04:00
parent 233da80a87
commit 2f8915ce2b
13 changed files with 158 additions and 181 deletions

View File

@@ -8,6 +8,7 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class AsyncPlayerDataSaving {
public static final ExecutorService IO_POOL = new ThreadPoolExecutor(
1, 1, 0, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<>(),

View File

@@ -12,7 +12,6 @@ public class AsyncBlockFinding extends ConfigModules {
@Experimental
public static boolean enabled = false;
public static boolean asyncBlockFindingInitialized;
@Override

View File

@@ -14,22 +14,22 @@ public class OptimizeNonFlushPacketSending extends ConfigModules {
@Override
public void onLoaded() {
enabled = config.getBoolean(getBasePath() + ".OptimizeNonFlushPacketSending", enabled, config.pickStringRegionBased("""
WARNING: This option is NOT compatible with ProtocolLib and may cause
WARNING: This option is NOT compatible with ProtocolLib and may cause
issues with other plugins that modify packet handling.
Optimizes non-flush packet sending by using Netty's lazyExecute method to avoid
Optimizes non-flush packet sending by using Netty's lazyExecute method to avoid
expensive thread wakeup calls when scheduling packet operations.
Requires server restart to take effect.
""",
"""
警告此选项与 ProtocolLib 不兼容并可能导致与其他修改数据包
处理的插件出现问题
警告: 此选项与 ProtocolLib 不兼容, 并可能导致与其他修改数据包
处理的插件出现问题.
通过使用 Netty 的 lazyExecute 方法来优化非刷新数据包的发送
避免在调度数据包操作时进行昂贵的线程唤醒调用
通过使用 Netty 的 lazyExecute 方法来优化非刷新数据包的发送,
避免在调度数据包操作时进行昂贵的线程唤醒调用.
需要重启服务器才能生效
需要重启服务器才能生效.
"""));
}
}