mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-03 17:29:57 +01:00
Delay registry check in-case Citizens is slow to enable
This commit is contained in:
parent
1ff72d811d
commit
4f921c1c5f
@ -78,6 +78,10 @@ public class Dependencies {
|
||||
return citizens;
|
||||
}
|
||||
|
||||
public void disableCitizens() {
|
||||
citizens = null;
|
||||
}
|
||||
|
||||
public Denizen getDenizen() {
|
||||
return denizen;
|
||||
}
|
||||
@ -109,9 +113,6 @@ public class Dependencies {
|
||||
try {
|
||||
if (isPluginAvailable("Citizens")) {
|
||||
citizens = (CitizensPlugin) plugin.getServer().getPluginManager().getPlugin("Citizens");
|
||||
if (citizens.getNPCRegistry() == null) {
|
||||
citizens = null;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
plugin.getLogger().warning("Legacy version of Citizens found. Citizens in Quests not enabled.");
|
||||
|
@ -477,6 +477,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
+ ", " + events.size() + " Event(s)"
|
||||
+ ", " + Lang.size() + " Phrase(s)");
|
||||
questers.addAll(getOnlineQuesters());
|
||||
if (depends.getCitizens() != null) {
|
||||
if (depends.getCitizens().getNPCRegistry() == null) {
|
||||
getLogger().log(Level.SEVERE, "Citizens was enabled but NPCRegistry was null. Disabling linkage.");
|
||||
depends.disableCitizens();
|
||||
}
|
||||
}
|
||||
loadModules();
|
||||
}
|
||||
}, 5L);
|
||||
|
Loading…
Reference in New Issue
Block a user