use of com.skelril.nitro.module.NModuleTrigger in project Skree by Skelril.
the class AidSystem method init.
@NModuleTrigger(trigger = "SERVER_STARTED")
public void init() {
try {
AntiPeskConfig config = ConfigLoader.loadConfig("anti_pesk.json", AntiPeskConfig.class);
Sponge.getEventManager().registerListeners(SkreePlugin.inst(), new ChatCommandAid());
Sponge.getEventManager().registerListeners(SkreePlugin.inst(), new AntiPeskListener(config));
} catch (IOException e) {
e.printStackTrace();
}
}
use of com.skelril.nitro.module.NModuleTrigger in project Skree by Skelril.
the class AntiHackSystem method init.
@NModuleTrigger(trigger = "SERVER_STARTED")
public void init() {
Sponge.getEventManager().registerListeners(SkreePlugin.inst(), new AntiJumpListener());
Sponge.getEventManager().registerListeners(SkreePlugin.inst(), new AntiRailDupeListener());
}
use of com.skelril.nitro.module.NModuleTrigger in project Skree by Skelril.
the class ShutdownSystem method init.
@NModuleTrigger(trigger = "SERVER_STARTED")
public void init() {
service = new ShutdownServiceImpl();
// Register the service & command
Sponge.getServiceManager().setProvider(SkreePlugin.inst(), ShutdownService.class, service);
Sponge.getCommandManager().register(SkreePlugin.inst(), ShutdownCommand.aquireSpec(), "shutdown");
}
use of com.skelril.nitro.module.NModuleTrigger in project Skree by Skelril.
the class ZoneSystem method init.
@NModuleTrigger(trigger = "SERVER_STARTED", dependencies = { "World System" })
public void init() {
Optional<WorldService> optService = Sponge.getServiceManager().provide(WorldService.class);
World world = optService.get().getEffectWrapper(InstanceWorldWrapper.class).get().getWorlds().iterator().next();
Task.builder().execute(() -> {
WorldResolver instWorldResolver = new WorldResolver(world, WorldEdit.getInstance());
service = new ZoneServiceImpl(new CacheBasedAllocator(Decorators.ZONE_PRIMARY_DECORATOR, instWorldResolver));
service.registerManager(new CursedMineManager());
service.registerManager(new TempleOfFateManager());
try {
service.registerManager(new TheForgeManager(loadConfig("zone/the_forge.json", TheForgeConfig.class)));
} catch (IOException e) {
e.printStackTrace();
}
service.registerManager(new CatacombsManager());
service.registerManager(new DesmireDungeonManager());
service.registerManager(new FreakyFourManager());
service.registerManager(new GoldRushManager());
service.registerManager(new JungleRaidManager());
service.registerManager(new PatientXManager());
service.registerManager(new ShnugglesPrimeManager());
service.registerManager(new SkyWarsManager());
service.registerManager(new TheButcherShopManager());
Sponge.getServiceManager().setProvider(SkreePlugin.inst(), ZoneService.class, service);
Sponge.getCommandManager().register(SkreePlugin.inst(), ZoneMeCommand.aquireSpec(), "zoneme");
}).delayTicks(1).submit(SkreePlugin.inst());
}
use of com.skelril.nitro.module.NModuleTrigger in project Skree by Skelril.
the class HighScoreSystem method init.
@NModuleTrigger(trigger = "PRE_INITIALIZATION")
public void init() {
service = new HighScoreServiceImpl();
Sponge.getServiceManager().setProvider(SkreePlugin.inst(), HighScoreService.class, service);
Sponge.getCommandManager().register(SkreePlugin.inst(), HighScoreCommand.aquireSpec(), "highscores", "highscore");
}
Aggregations