use of eu.okaeri.platform.bukkit.plan.BukkitCommandsSetupTask in project okaeri-platform by OkaeriPoland.
the class OkaeriBukkitPlugin method plan.
@Override
public void plan(@NonNull ExecutionPlan plan) {
plan.add(PRE_SETUP, new InjectorSetupTask());
plan.add(PRE_SETUP, (ExecutionTask<OkaeriBukkitPlugin>) platform -> {
platform.registerInjectable("server", platform.getServer());
platform.registerInjectable("dataFolder", platform.getDataFolder());
platform.registerInjectable("jarFile", platform.getFile());
platform.registerInjectable("logger", platform.getLogger());
platform.registerInjectable("plugin", platform);
platform.registerInjectable("placeholders", BukkitPlaceholders.create(true));
platform.registerInjectable("scheduler", new PlatformScheduler(platform, platform.getServer().getScheduler()));
platform.registerInjectable("tasker", BukkitTasker.newPool(platform));
platform.registerInjectable("pluginManager", platform.getServer().getPluginManager());
platform.registerInjectable("defaultConfigurerProvider", (ConfigurerProvider) YamlBukkitConfigurer::new);
platform.registerInjectable("defaultConfigurerSerdes", new Class[] { SerdesCommons.class, SerdesBukkit.class });
platform.registerInjectable("defaultPlaceholdersFactory", new SimplePlaceholdersFactory());
platform.registerInjectable("i18nLocaleProvider", new PlayerLocaleProvider());
platform.registerInjectable("guardian", ReflectGuardian.create(ReflectPlaceholders.create()));
});
plan.add(SETUP, new BukkitCommandsSetupTask());
plan.add(SETUP, new CreatorSetupTask(BukkitComponentCreator.class, BukkitCreatorRegistry.class));
plan.add(POST_SETUP, new BukkitExternalResourceProviderSetupTask());
plan.add(POST_SETUP, new BeanManifestCreateTask());
plan.add(POST_SETUP, new BukkitCommandsI18nManifestTask());
plan.add(POST_SETUP, new BeanManifestExecuteTask());
plan.add(POST_SETUP, new CommandsI18nSetupTask());
plan.add(SHUTDOWN, new PersistenceShutdownTask());
}
Aggregations