9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-19 15:09:15 +00:00

修复世界加载问题

This commit is contained in:
XiaoMoMi
2025-11-18 23:24:04 +08:00
parent a7eeaf1cd9
commit bec79a957b

View File

@@ -267,8 +267,11 @@ public abstract class CraftEngine implements Plugin {
this.vanillaLootManager.delayedInit(); this.vanillaLootManager.delayedInit();
// 注册脱离坐骑监听器 // 注册脱离坐骑监听器
this.seatManager.delayedInit(); this.seatManager.delayedInit();
// 注册世界加载相关监听器
this.worldManager.delayedInit(); if (!Config.delayConfigurationLoad()) {
// 注册世界加载相关监听器
this.worldManager.delayedInit();
}
// 延迟任务 // 延迟任务
this.beforeEnableTaskRegistry.executeTasks(); this.beforeEnableTaskRegistry.executeTasks();
@@ -310,6 +313,7 @@ public abstract class CraftEngine implements Plugin {
} else { } else {
try { try {
this.reloadPlugin(Runnable::run, Runnable::run, true); this.reloadPlugin(Runnable::run, Runnable::run, true);
this.worldManager.delayedInit();
} catch (Exception e) { } catch (Exception e) {
this.logger.severe("Failed to reload plugin on delayed enable stage", e); this.logger.severe("Failed to reload plugin on delayed enable stage", e);
} }