Check NPC registry at startup, fixes #2168

This commit is contained in:
PikaMug 2023-12-03 22:29:56 -05:00
parent 8507ebcb64
commit 85c99bac5a

View File

@ -633,10 +633,12 @@ public class BukkitQuestsPlugin extends JavaPlugin implements Quests {
depends.unlinkCitizens();
}
}
if (depends.getZnpcsPlusApi() == null) {
getLogger().log(Level.SEVERE,
"ZNPCsPlus was enabled but NpcApiProvider was null. Disabling linkage.");
depends.unlinkZnpcsPlusApi();
if (depends.getZnpcsPlusApi() != null) {
if (depends.getZnpcsPlusApi().getNpcRegistry() == null) {
getLogger().log(Level.SEVERE,
"ZNPCsPlus was enabled but NpcApiProvider was null. Disabling linkage.");
depends.unlinkZnpcsPlusApi();
}
}
customLoader.init();
questLoader.importQuests();