Package org.terasology.config

Examples of org.terasology.config.ModuleConfig


        }
    }

    @Override
    public void onClosed() {
        ModuleConfig moduleConfig = config.getDefaultModSelection();
        moduleConfig.clear();
        for (ModuleSelectionInfo info : sortedModules) {
            if (info.isSelected() && info.isExplicitSelection()) {
                moduleConfig.addModule(info.getMetadata().getId());
            }
        }
        if (!moduleConfig.hasModule(config.getWorldGeneration().getDefaultGenerator().getModuleName())) {
            config.getWorldGeneration().setDefaultGenerator(new SimpleUri());
        }
        config.save();
    }
View Full Code Here


        return enabledModules;
    }

    private void setSelectedGameplayModule(Module previousModule, Module module) {
        ModuleConfig moduleConfig = config.getDefaultModSelection();
        moduleConfig.setDefaultGameplayModuleName(module.getId().toString());
        if (previousModule != null) {
            moduleConfig.removeModule(previousModule.getId());
        }
        moduleConfig.addModule(module.getId());

        if (!moduleConfig.hasModule(config.getWorldGeneration().getDefaultGenerator().getModuleName())) {
            config.getWorldGeneration().setDefaultGenerator(new SimpleUri());
        }
        config.save();
    }
View Full Code Here

TOP

Related Classes of org.terasology.config.ModuleConfig

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.