Package com.bergerkiller.bukkit.common.config

Examples of com.bergerkiller.bukkit.common.config.BasicConfiguration


    if (!dir.exists()) {
      return false;
    }
    for (File file : dir.listFiles()) {
      try {
        BasicConfiguration config = getPluginConfiguration(file, "plugin.yml");
        String pluginName = config.get("name", String.class);
        if (name.equals(pluginName)) {
          return true;
        }
      } catch(IOException e) {
      }
View Full Code Here


   * @throws IOException if loading fails or the file can not be found
   */
  public static BasicConfiguration getPluginConfiguration(File pluginJarFile, String configResourcePath) throws IOException {
    InputStream stream = getPluginResource(pluginJarFile, configResourcePath);
    try {
      BasicConfiguration config = new BasicConfiguration();
      try {
        config.loadFromStream(stream);
      } catch (Throwable t) {
        throw new IOException("Error in YAML format", t);
      }
      return config;
    } finally {
View Full Code Here

TOP

Related Classes of com.bergerkiller.bukkit.common.config.BasicConfiguration

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.