use of io.github.wysohn.triggerreactor.sponge.manager.event.TriggerReactorStartEvent in project TriggerReactor by wysohn.
the class TriggerReactor method onEnable.
@Listener
public void onEnable(GameStartedServerEvent e) {
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
for (Manager manager : Manager.getManagers()) {
try {
manager.reload();
} catch (Exception ex) {
ex.printStackTrace();
}
}
Sponge.getScheduler().createTaskBuilder().execute(new Runnable() {
@Override
public void run() {
Sponge.getEventManager().post(new TriggerReactorStartEvent(TriggerReactor.this));
}
}).submit(this);
}
Aggregations