Package org.bukkit.configuration.file

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


        mcMMO.p.debug("Saving previous XP formula type...");
        YamlConfiguration formulasFile = new YamlConfiguration();
        formulasFile.set("Previous_Formula", previousFormula.toString());

        try {
            formulasFile.save(formulaFile);
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here


            }
        try
        {
            config.save(configFile);
            advanced.save(advancedFile);
            grief.save(griefFile);
        } catch (IOException e)
        {}

        return w;
    }
View Full Code Here

   
    //TODO Validate the size
   
    // try and save the meta data if we can
    try {
      metaYaml.save(metaFile);
    } catch (IOException e) {
     
      // we can recover from this... so eat it!
      generator.reportException("[WorldEdit] Could not resave " + metaFile.getAbsolutePath(), e);
    }
View Full Code Here

            String inventoryString = new MIEnderchestInventory(inventory).toString();
            playerFile.set(inventoryName, inventoryString);
            String folder = file.getParentFile().getName();
            MultiInv.log.debug("Saving " + playername + "'s " + inventoryName + " Enderchest inventory to " + folder);
            try {
                playerFile.save(file);
            } catch(IOException e) {
                e.printStackTrace();
            }
        }
    }
View Full Code Here

            for (Map.Entry<String, Object> entry : newValues.entrySet()) {
                rootSection.set(entry.getKey(), entry.getValue());
            }

            try {
                wconf.save(new File(getDataFolder(), "worlds.yml"));
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
View Full Code Here

      File        dest = new File("test.yaml");
     
//      conf.addDefaults(serialized);
      conf.set("test", value);
//      conf.createSection("test", serialized);
      conf.save(dest);
     
     
      System.out.println ("Deserialized: "+ConfigurationSerialization.deserializeObject(serialized));

      System.out.println ("Saved to " + dest.getAbsolutePath());
View Full Code Here

      }
     
      try {
        // save
        conf.set(PATH, shop);
        conf.save(file);

      } catch (IOException ioe) {
        scs.log(Level.WARNING, "Couldn't save shop with UUID = " + shop.getUUID().toString(), false);
        ioe.printStackTrace();
      }
View Full Code Here

            if (jar != null)
                configuration.set(plugin.getDescription().getName().toLowerCase().replace(" ", ""),
                        jar.getName());
        }
        try {
            configuration.save(JARS_FILE);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

            final File jar = getJAR(plugin);
            if (jar != null)
                configuration.set(plugin.getDescription().getName().toLowerCase().replace(" ", ""),
                        jar.getName());
            try {
                configuration.save(JARS_FILE);
            } catch (IOException e) {
                e.printStackTrace();
            }
            return true;
        }
View Full Code Here

        if (previousVersion.get("version") == null) {
            previousVersion.set("version", CURRENT_DATABASE_VERSION);

            try {
                previousVersion.save(versionFile);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
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.