Search in sources :

Example 1 with WorldServiceImpl

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

the class WorldSystem method init.

@NModuleTrigger(trigger = "SERVER_STARTED")
public void init() {
    service = new WorldServiceImpl();
    try {
        config = ConfigLoader.loadConfig("worlds.json", WorldSystemConfig.class);
        // Register the service & command
        Sponge.getEventManager().registerListeners(SkreePlugin.inst(), service);
        Sponge.getServiceManager().setProvider(SkreePlugin.inst(), WorldService.class, service);
        Sponge.getCommandManager().register(SkreePlugin.inst(), LoadWorldCommand.aquireSpec(), "loadworld");
        Sponge.getCommandManager().register(SkreePlugin.inst(), SetSpawnCommand.aquireSpec(), "setspawn");
        Sponge.getCommandManager().register(SkreePlugin.inst(), WorldCommand.aquireSpec(), "world");
        Sponge.getCommandManager().register(SkreePlugin.inst(), WorldListCommand.aquireSpec(), "worlds");
        Sponge.getCommandManager().register(SkreePlugin.inst(), WildernessMetaCommand.aquireSpec(), "wmeta");
        Sponge.getCommandManager().register(SkreePlugin.inst(), SummonWandererCommand.aquireSpec(), "wanderer");
        Sponge.getCommandManager().register(SkreePlugin.inst(), WildernessTeleportCommand.aquireSpec(), "wtp");
        initArchetypes();
        initWrappers();
        initWorlds();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
Also used : WorldServiceImpl(com.skelril.skree.service.internal.world.WorldServiceImpl) IOException(java.io.IOException) NModuleTrigger(com.skelril.nitro.module.NModuleTrigger)

Aggregations

NModuleTrigger (com.skelril.nitro.module.NModuleTrigger)1 WorldServiceImpl (com.skelril.skree.service.internal.world.WorldServiceImpl)1 IOException (java.io.IOException)1