Search in sources :

Example 1 with SpongeWrapper

use of io.github.wysohn.triggerreactor.sponge.bridge.SpongeWrapper in project TriggerReactor by wysohn.

the class TriggerReactor method onConstruct.

@Listener
public void onConstruct(GameInitializationEvent event) {
    onCoreEnable();
    SYNC_EXECUTOR = Sponge.getScheduler().createSyncExecutor(this);
    WRAPPER = new SpongeWrapper();
    try {
        executorManager = new ExecutorManager(this);
    } catch (ScriptException | IOException e) {
        initFailed(e);
        return;
    }
    try {
        placeholderManager = new PlaceholderManager(this);
    } catch (ScriptException | IOException e) {
        initFailed(e);
        return;
    }
    this.scriptEditManager = new ScriptEditManager(this);
    this.locationManager = new PlayerLocationManager(this);
    // this.permissionManager = new PermissionManager(this);
    this.selectionManager = new AreaSelectionManager(this);
    this.invEditManager = new InventoryEditManager(this);
    this.clickManager = new ClickTriggerManager(this);
    this.walkManager = new WalkTriggerManager(this);
    this.cmdManager = new CommandTriggerManager(this);
    this.invManager = new InventoryTriggerManager(this);
    this.areaManager = new AreaTriggerManager(this);
    this.customManager = new CustomTriggerManager(this);
    this.repeatManager = new RepeatingTriggerManager(this);
    this.namedTriggerManager = new NamedTriggerManager(this);
    tpsHelper = new Lag();
    Sponge.getScheduler().createTaskBuilder().execute(tpsHelper).delayTicks(100L).intervalTicks(1L).submit(this);
}
Also used : SpongeWrapper(io.github.wysohn.triggerreactor.sponge.bridge.SpongeWrapper) IOException(java.io.IOException) AbstractCommandTriggerManager(io.github.wysohn.triggerreactor.core.manager.trigger.command.AbstractCommandTriggerManager) AbstractAreaTriggerManager(io.github.wysohn.triggerreactor.core.manager.trigger.area.AbstractAreaTriggerManager) ScriptException(javax.script.ScriptException) Lag(io.github.wysohn.triggerreactor.tools.Lag) AbstractRepeatingTriggerManager(io.github.wysohn.triggerreactor.core.manager.trigger.repeating.AbstractRepeatingTriggerManager) AbstractNamedTriggerManager(io.github.wysohn.triggerreactor.core.manager.trigger.named.AbstractNamedTriggerManager) AbstractInventoryTriggerManager(io.github.wysohn.triggerreactor.core.manager.trigger.inventory.AbstractInventoryTriggerManager) AbstractCustomTriggerManager(io.github.wysohn.triggerreactor.core.manager.trigger.custom.AbstractCustomTriggerManager) Listener(org.spongepowered.api.event.Listener)

Aggregations

AbstractAreaTriggerManager (io.github.wysohn.triggerreactor.core.manager.trigger.area.AbstractAreaTriggerManager)1 AbstractCommandTriggerManager (io.github.wysohn.triggerreactor.core.manager.trigger.command.AbstractCommandTriggerManager)1 AbstractCustomTriggerManager (io.github.wysohn.triggerreactor.core.manager.trigger.custom.AbstractCustomTriggerManager)1 AbstractInventoryTriggerManager (io.github.wysohn.triggerreactor.core.manager.trigger.inventory.AbstractInventoryTriggerManager)1 AbstractNamedTriggerManager (io.github.wysohn.triggerreactor.core.manager.trigger.named.AbstractNamedTriggerManager)1 AbstractRepeatingTriggerManager (io.github.wysohn.triggerreactor.core.manager.trigger.repeating.AbstractRepeatingTriggerManager)1 SpongeWrapper (io.github.wysohn.triggerreactor.sponge.bridge.SpongeWrapper)1 Lag (io.github.wysohn.triggerreactor.tools.Lag)1 IOException (java.io.IOException)1 ScriptException (javax.script.ScriptException)1 Listener (org.spongepowered.api.event.Listener)1