use of eu.okaeri.platform.bungee.scheduler.PlatformScheduler in project okaeri-platform by OkaeriPoland.
the class OkaeriBungeePlugin method plan.
@Override
public void plan(@NonNull ExecutionPlan plan) {
plan.add(PRE_SETUP, new InjectorSetupTask());
plan.add(PRE_SETUP, (ExecutionTask<OkaeriBungeePlugin>) platform -> {
platform.registerInjectable("proxy", platform.getProxy());
platform.registerInjectable("dataFolder", platform.getDataFolder());
platform.registerInjectable("jarFile", platform.getFile());
platform.registerInjectable("logger", platform.getLogger());
platform.registerInjectable("plugin", platform);
platform.registerInjectable("placeholders", BungeePlaceholders.create(true));
platform.registerInjectable("scheduler", new PlatformScheduler(platform, platform.getProxy().getScheduler()));
platform.registerInjectable("pluginManager", platform.getProxy().getPluginManager());
platform.registerInjectable("defaultConfigurerProvider", (ConfigurerProvider) YamlBungeeConfigurer::new);
platform.registerInjectable("defaultConfigurerSerdes", new Class[] { SerdesCommons.class, SerdesBungee.class });
platform.registerInjectable("defaultPlaceholdersFactory", new SimplePlaceholdersFactory());
platform.registerInjectable("i18nLocaleProvider", new ProxiedPlayerLocaleProvider());
});
// plan.add(PRE_SETUP, new BungeeCommandsSetupTask()); TODO
plan.add(SETUP, new CreatorSetupTask(BungeeComponentCreator.class, BungeeCreatorRegistry.class), "creator");
plan.add(POST_SETUP, new BungeeExternalResourceProviderSetupTask());
plan.add(POST_SETUP, new BeanManifestCreateTask());
plan.add(POST_SETUP, new BeanManifestExecuteTask());
plan.add(SHUTDOWN, new BungeeSchedulerShutdownTask());
plan.add(SHUTDOWN, new PersistenceShutdownTask());
}
Aggregations