Package com.palmergames.bukkit.config

Examples of com.palmergames.bukkit.config.CommentedConfiguration


  public static void loadConfig(String filepath, String version) throws IOException {
    File file = FileMgmt.CheckYMLExists(new File(filepath));
    if (file != null) {
           
      // read the config.yml into memory
      config = new CommentedConfiguration(file);
      if(!config.load())
        System.out.print("Failed to load Config!");
     
      setDefaults(version, file);
     
View Full Code Here


   
    File file = FileMgmt.unpackLanguageFile(defaultName, res, defaultRes);
    if (file != null) {

      // read the (language).yml into memory
      language = new CommentedConfiguration(file);
      language.load();
      
    }
  }
View Full Code Here

    /**
     * Builds a new config reading old config data.
     */
    private static void setDefaults(String version, File file) {
     
      newConfig = new CommentedConfiguration(file);
      newConfig.load();
     
        for (ConfigNodes root : ConfigNodes.values()) {
          if (root.getComments().length > 0)
            addComment(root.getRoot(), root.getComments());
View Full Code Here

TOP

Related Classes of com.palmergames.bukkit.config.CommentedConfiguration

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.