mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-29 11:59:24 +00:00
add temporary compatibility for plugins to PWT
This commit is contained in:
@@ -15,6 +15,7 @@ public class SparklyPaperParallelWorldTicking extends ConfigModules {
|
||||
public static int threads = 8;
|
||||
public static boolean logContainerCreationStacktraces = false;
|
||||
public static boolean disableHardThrow = false;
|
||||
public static boolean runAsyncTasksSync = false;
|
||||
|
||||
@Override
|
||||
public void onLoaded() {
|
||||
@@ -26,6 +27,7 @@ public class SparklyPaperParallelWorldTicking extends ConfigModules {
|
||||
**实验性功能**
|
||||
启用并行世界处理以提高多核系统的性能.""");
|
||||
|
||||
|
||||
enabled = config.getBoolean(getBasePath() + ".enabled", enabled);
|
||||
threads = config.getInt(getBasePath() + ".threads", threads);
|
||||
threads = enabled ? threads : 0;
|
||||
@@ -33,5 +35,7 @@ public class SparklyPaperParallelWorldTicking extends ConfigModules {
|
||||
logContainerCreationStacktraces = enabled && logContainerCreationStacktraces;
|
||||
disableHardThrow = config.getBoolean(getBasePath() + ".disable-hard-throw", disableHardThrow);
|
||||
disableHardThrow = enabled && disableHardThrow;
|
||||
runAsyncTasksSync = config.getBoolean(getBasePath() + ".run-async-tasks-sync", runAsyncTasksSync);
|
||||
runAsyncTasksSync = enabled && runAsyncTasksSync;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user