9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 09:59:15 +00:00

Skip inactive entity for execute functions (#396)

This commit is contained in:
Creeam
2025-07-11 08:09:28 +14:00
committed by GitHub
parent 53f6cb4e4d
commit 871e004368
2 changed files with 160 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package org.dreeam.leaf.config.modules.opt;
import org.dreeam.leaf.config.ConfigModules;
import org.dreeam.leaf.config.EnumConfigCategory;
public class SkipInactiveEntityForExecute extends ConfigModules {
public String getBasePath() {
return EnumConfigCategory.PERF.getBaseKeyName();
}
public static boolean skipInactiveEntityForExecute = false;
@Override
public void onLoaded() {
skipInactiveEntityForExecute = config.getBoolean(getBasePath() + ".skip-inactive-entity-for-execute-command", skipInactiveEntityForExecute,
config.pickStringRegionBased("""
*** Experimental Feature ***
Skip selecting inactive entities when using execute command.
Will improve performance on servers with massive datapack functions.""",
"""
*** 实验性功能 ***
execute 命令执行时跳过不活跃实体.
将会提升有大量数据包函数的服务器性能."""));
}
}