Package com.zachsthings.libcomponents.bukkit

Examples of com.zachsthings.libcomponents.bukkit.YAMLNodeConfigurationNode


        } catch (YAMLException e) {
            getLogger().severe("Error loading component aliases!");
            e.printStackTrace();
        }
        componentManager.addComponentLoader(new ConfigListedComponentLoader(getLogger(),
                new YAMLNodeConfigurationNode(config),
                new YAMLNodeConfigurationNode(jarComponentAliases), configDir));

        for (String dir : config.getStringList("component-class-dirs", Arrays.asList("component-classes"))) {
            final File classesDir = new File(getDataFolder(), dir);
            if (!classesDir.exists() || !classesDir.isDirectory()) {
                classesDir.mkdirs();
View Full Code Here


    public void disable() {
        for (Player player : CommandBook.server().getOnlinePlayers()) {
            String type = getType(player.getClass());
            for (PersistentSession session : getSessions(player)) {
                session.handleDisconnect();
                session.save(new YAMLNodeConfigurationNode(getSessionConfiguration(type, UUIDUtil.toUniqueString(player), session.getClass())));
            }
            YAMLProcessor proc = getUserConfiguration(type, UUIDUtil.toUniqueString(player), false);
            if (proc != null) {
                proc.save();
            }
View Full Code Here

            if (session == null) {
                session = getSessionFactory(type).createSession(user);
                if (session != null) {
                    YAMLNode node = getSessionConfiguration(getType(user.getClass()), UUIDUtil.toUniqueString(user), type, false);
                    if (node != null) {
                       session.load(new YAMLNodeConfigurationNode(node));
                    }
                    session.handleReconnect(user);
                    userSessions.put(type, session);
                }
            }
View Full Code Here

    public void onLogin(PlayerLoginEvent event) {
        Player player = event.getPlayer();
        String type = getType(player.getClass());
        // Trigger the session
        for (PersistentSession session : getSessions(player)) {
            session.load(new YAMLNodeConfigurationNode(getSessionConfiguration(type, UUIDUtil.toUniqueString(player), session.getClass())));
            session.handleReconnect(event.getPlayer());
        }
    }
View Full Code Here

    public void onPlayerQuit(PlayerQuitEvent event) {
        Player player = event.getPlayer();
        String type = getType(player.getClass());
        for (PersistentSession session : getSessions(event.getPlayer())) {
            session.handleDisconnect();
            session.save(new YAMLNodeConfigurationNode(getSessionConfiguration(type, UUIDUtil.toUniqueString(player), session.getClass())));
        }
        YAMLProcessor proc = getUserConfiguration(type, UUIDUtil.toUniqueString(player), false);
        if (proc != null) {
            proc.save();
        }
View Full Code Here

TOP

Related Classes of com.zachsthings.libcomponents.bukkit.YAMLNodeConfigurationNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.