Package com.bergerkiller.bukkit.common.config

Examples of com.bergerkiller.bukkit.common.config.FileConfiguration.save()


  public static void save(String filename) {
    FileConfiguration config = new FileConfiguration(filename);
    for (TimeSign sign : timerSigns.values()) {
      config.set(sign.name, sign.getDuration());
    }
    config.save();
  }
  public static void deinit() {
    timerSigns.clear();
    timerSigns = null;
    timeCalculations.clear();
View Full Code Here


  public static void load() {
    loadDefaults();
    FileConfiguration config = new FileConfiguration(TrainCarts.plugin, propertiesFile);
    config.load();
    if (fixDeprecation(config)) {
      config.save();
    }
    for (ConfigurationNode node : config.getNodes()) {
      TrainProperties prop = new TrainProperties(node.getName());
      prop.load(node);
      trainProperties.put(prop.getTrainName(), prop);
View Full Code Here

        prop.save(config.getNode(prop.getTrainName()));
      } else {
        config.remove(prop.getTrainName());
      }
    }
    config.save();
  }

  /**
   * Gets the Configuration Node containing the defaults of the name specified
   *
 
View Full Code Here

    for (WorldConfig wc : all()) {
      if (wc.isExisting()) {
        wc.save(cfg.getNode(wc.getConfigName()));
      }
    }
    cfg.save();
  }

  public static void deinit() {
    // Tell all loaded worlds to unload (for MyWorlds) to properly handle disabling
    for (World world : WorldUtil.getWorlds()) {
View Full Code Here

    config.setHeader("importFromMultiVerse", "\nWhether to automatically import the world configuration of MultiVerse for new (unknown) worlds");
    config.addHeader("importFromMultiverse", "Note that default world properties are then no longer applied, as MultiVerse takes that over");
    config.addHeader("importFromMultiverse", "This setting is only active if MultiVerse-Core is installed.");
    importFromMultiVerse = config.get("importFromMultiVerse", true);

    config.save();

    // World configurations have to be loaded first
    WorldConfig.init();

    // Portals
View Full Code Here

        ConfigurationNode node = config.getNode(name);
        node.set("folder", inventory.worldname);
        node.set("worlds", new ArrayList<String>(inventory.worlds));
      }
    }
    config.save();
  }

  public static void detach(Collection<String> worldnames) {
    for (String world : worldnames) {
      WorldConfig.get(world).inventory.remove(world, true);
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.