Wait for Citizens to load its stored NPCs before migration
Some checks failed
DuneRealms Plugin CI / plugins (push) Has been cancelled
Citizens Load Barrier Build / citizens-ready (push) Has been cancelled

This commit is contained in:
unimatrixgit 2026-12-03 22:29:18 +01:00
commit 64248beb1e

View file

@ -41,7 +41,7 @@ public final class DuneLobby extends JavaPlugin implements Listener, CommandExec
@Override public boolean shouldGenerateStructures() { return false; }
}
@Override public void onEnable() {
saveDefaultConfig(); roleKey=new NamespacedKey(this,"role"); com.dunerealms.npc.CitizensBridge.start(this,roleKey);
saveDefaultConfig(); roleKey=new NamespacedKey(this,"role"); com.dunerealms.npc.CitizensBridge.start(this, () -> { if(lobby!=null)ensureNpcs(); }, roleKey);
getCommand("lobby").setExecutor(this); getCommand("dunelobby").setExecutor(this);
Bukkit.getPluginManager().registerEvents(this,this);
Bukkit.getMessenger().registerOutgoingPluginChannel(this,"BungeeCord");