use of com.playmonumenta.scriptedquests.managers.QuestNpcManager in project scripted-quests by TeamMonumenta.
the class Plugin method onEnable.
@Override
public void onEnable() {
INSTANCE = this;
PluginManager manager = getServer().getPluginManager();
mQuestCompassManager = new QuestCompassManager(this);
mNpcManager = new QuestNpcManager(this);
mClickableManager = new ClickableManager();
mInteractableManager = new InteractableManager();
mTradeManager = new NpcTradeManager();
mLoginManager = new QuestLoginManager();
mDeathManager = new QuestDeathManager();
mRaceManager = new RaceManager(this);
mCodeManager = new CodeManager();
mZoneEventListener = new ZoneEventListener(this);
mZoneManager = new ZoneManager(this);
mZoneManager.doReload(this);
mZonePropertyManager = new ZonePropertyManager(this);
mTimerManager = new CommandTimerManager(this);
mWaypointManager = new WaypointManager(this);
mGuiManager = new GuiManager(this);
manager.registerEvents(new EntityListener(this), this);
manager.registerEvents(new InteractablesListener(this), this);
manager.registerEvents(new PlayerListener(this), this);
manager.registerEvents(new WorldListener(this), this);
if (mTranslationsManager != null) {
manager.registerEvents(mTranslationsManager, this);
}
manager.registerEvents(mTimerManager, this);
manager.registerEvents(mZonePropertyManager, this);
manager.registerEvents(mTradeManager, this);
manager.registerEvents(mZoneEventListener, this);
// Hook into ProtocolLib if present
if (Bukkit.getPluginManager().isPluginEnabled("ProtocolLib")) {
mProtocolLibIntegration = new ProtocolLibIntegration(this);
}
getCommand("reloadQuests").setExecutor(new ReloadQuests(this));
getCommand("questTrigger").setExecutor(new QuestTrigger(this));
ClientChatProtocol.initialize(this);
/* Load the config 1 tick later to let other plugins load */
new BukkitRunnable() {
@Override
public void run() {
reloadConfig(null);
mZoneManager.reload(INSTANCE, Bukkit.getConsoleSender());
}
}.runTaskLater(this, 1);
}
Aggregations