Search in sources :

Example 1 with QuestDeathManager

use of com.playmonumenta.scriptedquests.managers.QuestDeathManager 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);
}
Also used : EntityListener(com.playmonumenta.scriptedquests.listeners.EntityListener) ZonePropertyManager(com.playmonumenta.scriptedquests.managers.ZonePropertyManager) QuestCompassManager(com.playmonumenta.scriptedquests.managers.QuestCompassManager) InteractablesListener(com.playmonumenta.scriptedquests.listeners.InteractablesListener) ReloadQuests(com.playmonumenta.scriptedquests.commands.ReloadQuests) QuestDeathManager(com.playmonumenta.scriptedquests.managers.QuestDeathManager) PluginManager(org.bukkit.plugin.PluginManager) GuiManager(com.playmonumenta.scriptedquests.managers.GuiManager) QuestTrigger(com.playmonumenta.scriptedquests.commands.QuestTrigger) ProtocolLibIntegration(com.playmonumenta.scriptedquests.protocollib.ProtocolLibIntegration) ClickableManager(com.playmonumenta.scriptedquests.managers.ClickableManager) ZoneEventListener(com.playmonumenta.scriptedquests.listeners.ZoneEventListener) RaceManager(com.playmonumenta.scriptedquests.managers.RaceManager) NpcTradeManager(com.playmonumenta.scriptedquests.managers.NpcTradeManager) PlayerListener(com.playmonumenta.scriptedquests.listeners.PlayerListener) QuestLoginManager(com.playmonumenta.scriptedquests.managers.QuestLoginManager) CodeManager(com.playmonumenta.scriptedquests.managers.CodeManager) BukkitRunnable(org.bukkit.scheduler.BukkitRunnable) InteractableManager(com.playmonumenta.scriptedquests.managers.InteractableManager) WorldListener(com.playmonumenta.scriptedquests.listeners.WorldListener) WaypointManager(com.playmonumenta.scriptedquests.managers.WaypointManager) CommandTimerManager(com.playmonumenta.scriptedquests.timers.CommandTimerManager) QuestNpcManager(com.playmonumenta.scriptedquests.managers.QuestNpcManager) ZoneManager(com.playmonumenta.scriptedquests.zones.ZoneManager)

Aggregations

QuestTrigger (com.playmonumenta.scriptedquests.commands.QuestTrigger)1 ReloadQuests (com.playmonumenta.scriptedquests.commands.ReloadQuests)1 EntityListener (com.playmonumenta.scriptedquests.listeners.EntityListener)1 InteractablesListener (com.playmonumenta.scriptedquests.listeners.InteractablesListener)1 PlayerListener (com.playmonumenta.scriptedquests.listeners.PlayerListener)1 WorldListener (com.playmonumenta.scriptedquests.listeners.WorldListener)1 ZoneEventListener (com.playmonumenta.scriptedquests.listeners.ZoneEventListener)1 ClickableManager (com.playmonumenta.scriptedquests.managers.ClickableManager)1 CodeManager (com.playmonumenta.scriptedquests.managers.CodeManager)1 GuiManager (com.playmonumenta.scriptedquests.managers.GuiManager)1 InteractableManager (com.playmonumenta.scriptedquests.managers.InteractableManager)1 NpcTradeManager (com.playmonumenta.scriptedquests.managers.NpcTradeManager)1 QuestCompassManager (com.playmonumenta.scriptedquests.managers.QuestCompassManager)1 QuestDeathManager (com.playmonumenta.scriptedquests.managers.QuestDeathManager)1 QuestLoginManager (com.playmonumenta.scriptedquests.managers.QuestLoginManager)1 QuestNpcManager (com.playmonumenta.scriptedquests.managers.QuestNpcManager)1 RaceManager (com.playmonumenta.scriptedquests.managers.RaceManager)1 WaypointManager (com.playmonumenta.scriptedquests.managers.WaypointManager)1 ZonePropertyManager (com.playmonumenta.scriptedquests.managers.ZonePropertyManager)1 ProtocolLibIntegration (com.playmonumenta.scriptedquests.protocollib.ProtocolLibIntegration)1