mirror of
https://github.com/PikaMug/Quests.git
synced 2025-02-13 11:01:35 +01:00
Click to register NPC listener if Citizens link failed at startup
This commit is contained in:
parent
60290f0149
commit
bc2ae81922
@ -127,6 +127,7 @@ public class Dependencies {
|
||||
if (citizens == null && isPluginAvailable("Citizens")) {
|
||||
try {
|
||||
citizens = (CitizensPlugin) plugin.getServer().getPluginManager().getPlugin("Citizens");
|
||||
plugin.getServer().getPluginManager().registerEvents(plugin.getNpcListener(), plugin);
|
||||
plugin.getLogger().info("Successfully linked Quests with Citizens "
|
||||
+ citizens.getDescription().getVersion());
|
||||
} catch (final Exception e) {
|
||||
|
@ -215,8 +215,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
// 10 - Register listeners
|
||||
getServer().getPluginManager().registerEvents(blockListener, this);
|
||||
getServer().getPluginManager().registerEvents(itemListener, this);
|
||||
if (depends.getCitizens() != null) {
|
||||
getServer().getPluginManager().registerEvents(npcListener, this);
|
||||
if (depends.getCitizens() != null) { // #getCitizens takes care of registering npcListener
|
||||
if (settings.canNpcEffects()) {
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, effThread, 20, 20);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user