Package org.bukkit.configuration.file

Examples of org.bukkit.configuration.file.YamlConfiguration.createSection()


    }
  }
 
  public static void save() {
    YamlConfiguration warYmlConfig = new YamlConfiguration();
    ConfigurationSection warRootSection = warYmlConfig.createSection("set");
    (new File(War.war.getDataFolder().getPath())).mkdir();
    (new File(War.war.getDataFolder().getPath() + "/dat")).mkdir();

    // War settings
    ConfigurationSection warConfigSection = warRootSection.createSection("war.config");
View Full Code Here


    return null;
  }
 
  public static void save(Warzone warzone) {
    YamlConfiguration warzoneYmlConfig = new YamlConfiguration();
    ConfigurationSection warzoneRootSection = warzoneYmlConfig.createSection("set");
    (new File(War.war.getDataFolder().getPath() + "/dat/warzone-" + warzone.getName())).mkdir()// create folder
   
    ConfigurationSection warzoneSection = warzoneRootSection.createSection("warzone." + warzone.getName());
   
    // Warzone settings
View Full Code Here

        conf.options().copyDefaults(true);
        conf.options().indent(2);
       
        ConfigurationSection titleSection = conf.getConfigurationSection("Titles");
        if (titleSection == null) {
            titleSection = conf.createSection("Titles");
        }
        for (String titleKey : titleSection.getKeys(false)) {
            String titleName = conf.getString("Titles."+titleKey+".Name");
            String titleShortName = conf.getString("Titles."+titleKey+".ShortName");
            ChatColor titleColor = ChatColor.matchColor(conf.getString("Titles."+titleKey+".ChatColour", ""));
View Full Code Here

            .append(System.getProperty("line.separator"))
            .append("For example configurations, visit http://dev.bukkit.org/server-mods/jobs/.").append(System.getProperty("line.separator"))
            .toString());
        ConfigurationSection jobsSection = conf.getConfigurationSection("Jobs");
        if (jobsSection == null) {
            jobsSection = conf.createSection("Jobs");
        }
        for (String jobKey : jobsSection.getKeys(false)) {
            ConfigurationSection jobSection = jobsSection.getConfigurationSection(jobKey);
            String jobName = jobSection.getString("fullname");
            if (jobName == null) {
View Full Code Here

        if (wasChanged) {
            // clear config
            wconf.set("worlds", null);

            // and rebuild it
            ConfigurationSection rootSection = wconf.createSection("worlds");
            for (Map.Entry<String, Object> entry : newValues.entrySet()) {
                rootSection.set(entry.getKey(), entry.getValue());
            }

            try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.