Search in sources :

Example 1 with TriggerReactorStartEvent

use of io.github.wysohn.triggerreactor.bukkit.manager.event.TriggerReactorStartEvent in project TriggerReactor by wysohn.

the class AbstractJavaPlugin method onEnable.

@Override
public void onEnable() {
    super.onEnable();
    Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
    PluginCommand trg = this.getCommand("triggerreactor");
    trg.setExecutor(this);
    registerAPIs();
    initBungeeHelper();
    initMysql();
    core.onCoreEnable(this);
    migrateOldConfig();
    for (Manager manager : Manager.getManagers()) {
        manager.reload();
    }
    Bukkit.getScheduler().runTask(this, () -> Bukkit.getPluginManager().callEvent(new TriggerReactorStartEvent()));
}
Also used : TriggerReactorStartEvent(io.github.wysohn.triggerreactor.bukkit.manager.event.TriggerReactorStartEvent) MiniConnectionPoolManager(io.github.wysohn.triggerreactor.tools.mysql.MiniConnectionPoolManager) AbstractTriggerManager(io.github.wysohn.triggerreactor.core.manager.trigger.AbstractTriggerManager) ScriptEngineManager(javax.script.ScriptEngineManager) Manager(io.github.wysohn.triggerreactor.core.manager.Manager) PluginCommand(org.bukkit.command.PluginCommand)

Aggregations

TriggerReactorStartEvent (io.github.wysohn.triggerreactor.bukkit.manager.event.TriggerReactorStartEvent)1 Manager (io.github.wysohn.triggerreactor.core.manager.Manager)1 AbstractTriggerManager (io.github.wysohn.triggerreactor.core.manager.trigger.AbstractTriggerManager)1 MiniConnectionPoolManager (io.github.wysohn.triggerreactor.tools.mysql.MiniConnectionPoolManager)1 ScriptEngineManager (javax.script.ScriptEngineManager)1 PluginCommand (org.bukkit.command.PluginCommand)1