diff --git a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncTargetFinding.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncTargetFinding.java index c2ebeb42..c22f1ce4 100644 --- a/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncTargetFinding.java +++ b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncTargetFinding.java @@ -1,8 +1,8 @@ - package org.dreeam.leaf.config.modules.async; import org.dreeam.leaf.config.ConfigModules; import org.dreeam.leaf.config.EnumConfigCategory; +import org.dreeam.leaf.config.LeafConfig; public class AsyncTargetFinding extends ConfigModules { @@ -33,6 +33,11 @@ public class AsyncTargetFinding extends ConfigModules { asyncTargetFindingInitialized = true; enabled = config.getBoolean(getBasePath() + ".enabled", enabled); + // Disable if parallel world ticking is enabled, as they are incompatible. + if (enabled && SparklyPaperParallelWorldTicking.enabled) { + LeafConfig.LOGGER.warn("Async Target Finding is incompatible with Parallel World Ticking. Disabling Async Target Finding automatically."); + enabled = false; + } alertOther = config.getBoolean(getBasePath() + ".async-alert-other", true); searchBlock = config.getBoolean(getBasePath() + ".async-search-block", true); searchEntity = config.getBoolean(getBasePath() + ".async-search-entity", true);