Search in sources :

Example 6 with WorldEffectWrapper

use of com.skelril.skree.service.internal.world.WorldEffectWrapper in project Skree by Skelril.

the class WorldSystem method initWrappers.

private void initWrappers() throws IOException {
    List<WorldEffectWrapper> wrappers = Lists.newArrayList(new MainWorldWrapper(), new BuildWorldWrapper(ConfigLoader.loadConfig("build.json", BuildConfig.class)), new InstanceWorldWrapper(), new WildernessWorldWrapper(ConfigLoader.loadConfig("wilderness.json", WildernessConfig.class)));
    for (WorldEffectWrapper wrapper : wrappers) {
        this.wrappers.put(wrapper.getName(), wrapper);
        Sponge.getEventManager().registerListeners(SkreePlugin.inst(), wrapper);
        service.registerEffectWrapper(wrapper);
    }
}
Also used : MainWorldWrapper(com.skelril.skree.content.world.main.MainWorldWrapper) InstanceWorldWrapper(com.skelril.skree.content.world.instance.InstanceWorldWrapper) WorldEffectWrapper(com.skelril.skree.service.internal.world.WorldEffectWrapper) BuildWorldWrapper(com.skelril.skree.content.world.build.BuildWorldWrapper)

Aggregations

WorldEffectWrapper (com.skelril.skree.service.internal.world.WorldEffectWrapper)6 WorldService (com.skelril.skree.service.WorldService)5 InstanceWorldWrapper (com.skelril.skree.content.world.instance.InstanceWorldWrapper)3 World (org.spongepowered.api.world.World)2 BuildWorldWrapper (com.skelril.skree.content.world.build.BuildWorldWrapper)1 MainWorldWrapper (com.skelril.skree.content.world.main.MainWorldWrapper)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Sponge (org.spongepowered.api.Sponge)1 CommandException (org.spongepowered.api.command.CommandException)1 CommandResult (org.spongepowered.api.command.CommandResult)1 CommandSource (org.spongepowered.api.command.CommandSource)1 CommandContext (org.spongepowered.api.command.args.CommandContext)1 CommandExecutor (org.spongepowered.api.command.spec.CommandExecutor)1 CommandSpec (org.spongepowered.api.command.spec.CommandSpec)1 Player (org.spongepowered.api.entity.living.player.Player)1 Text (org.spongepowered.api.text.Text)1 TextActions (org.spongepowered.api.text.action.TextActions)1 TextColors (org.spongepowered.api.text.format.TextColors)1