mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-25 02:28:12 +01:00
Continue to attempt to load Citizens post-initialization, fixes #934
This commit is contained in:
parent
f27ad6466f
commit
c9e686b1dd
@ -89,6 +89,15 @@ public class Dependencies {
|
||||
}
|
||||
|
||||
public CitizensPlugin getCitizens() {
|
||||
if (citizens == null) {
|
||||
if (isPluginAvailable("Citizens")) {
|
||||
try {
|
||||
citizens = (CitizensPlugin) plugin.getServer().getPluginManager().getPlugin("Citizens");
|
||||
} catch (Exception e) {
|
||||
plugin.getLogger().warning("Legacy version of Citizens found. Citizens in Quests not enabled.");
|
||||
}
|
||||
}
|
||||
}
|
||||
return citizens;
|
||||
}
|
||||
|
||||
@ -124,12 +133,12 @@ public class Dependencies {
|
||||
}
|
||||
|
||||
void init() {
|
||||
try {
|
||||
if (isPluginAvailable("Citizens")) {
|
||||
if (isPluginAvailable("Citizens")) {
|
||||
try {
|
||||
citizens = (CitizensPlugin) plugin.getServer().getPluginManager().getPlugin("Citizens");
|
||||
} catch (Exception e) {
|
||||
plugin.getLogger().warning("Legacy version of Citizens found. Citizens in Quests not enabled.");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
plugin.getLogger().warning("Legacy version of Citizens found. Citizens in Quests not enabled.");
|
||||
}
|
||||
if (isPluginAvailable("WorldGuard")) {
|
||||
worldGuardApi = new WorldGuardAPI(plugin.getServer().getPluginManager().getPlugin("WorldGuard"));
|
||||
|
Loading…
Reference in New Issue
Block a user