9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-30 04:19:27 +00:00
This commit is contained in:
XiaoMoMi
2025-08-21 21:01:05 +08:00
parent 128bdb6045
commit 8157ad3099
5 changed files with 15 additions and 12 deletions

View File

@@ -18,7 +18,6 @@ import net.momirealms.craftengine.bukkit.plugin.reflection.minecraft.MMobEffects
import net.momirealms.craftengine.bukkit.plugin.reflection.minecraft.NetworkReflections;
import net.momirealms.craftengine.bukkit.util.*;
import net.momirealms.craftengine.bukkit.world.BukkitWorld;
import net.momirealms.craftengine.core.block.BlockSettings;
import net.momirealms.craftengine.core.block.BlockStateWrapper;
import net.momirealms.craftengine.core.block.ImmutableBlockState;
import net.momirealms.craftengine.core.entity.player.GameMode;

View File

@@ -48,6 +48,7 @@ public class BukkitWorldManager implements WorldManager, Listener {
private CEWorld lastVisitedWorld;
private StorageAdaptor storageAdaptor;
private boolean isTicking = false;
private boolean initialized = false;
public BukkitWorldManager(BukkitCraftEngine plugin) {
instance = this;
@@ -132,6 +133,7 @@ public class BukkitWorldManager implements WorldManager, Listener {
this.worldMapLock.writeLock().unlock();
}
Bukkit.getPluginManager().registerEvents(this, this.plugin.javaPlugin());
this.initialized = true;
}
@Override
@@ -237,6 +239,10 @@ public class BukkitWorldManager implements WorldManager, Listener {
}
}
public boolean initialized() {
return initialized;
}
@Override
public <T> net.momirealms.craftengine.core.world.World wrap(T world) {
if (world instanceof World w) {