Package com.bergerkiller.bukkit.common.config

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


      }
    }
  }

  public static void save() {
    FileConfiguration config = new FileConfiguration(MyWorlds.plugin, "inventories.yml");
    Set<String> savedNames = new HashSet<String>();
    for (WorldInventory inventory : inventories) {
      if (inventory.worlds.size() > 1) {
        String name = inventory.name;
        for (int i = 0; i < Integer.MAX_VALUE && !savedNames.add(name.toLowerCase()); i++) {
          name = inventory.name + i;
        }
        ConfigurationNode node = config.getNode(name);
        node.set("folder", inventory.worldname);
        node.set("worlds", new ArrayList<String>(inventory.worlds));
      }
    }
    config.save();
  }
View Full Code Here


    }

    this.setDisableMessage(this.getName() + " disabled!");

    // Load permission configuration
    this.permissionconfig = new FileConfiguration(this, "PermissionDefaults.yml");
    // load
    if (this.permissionconfig.exists()) {
      this.loadPermissions();
    }
    // header
    this.permissionconfig.setHeader("Below are the default permissions set for plugin '" + this.getName() + "'.");
    this.permissionconfig.addHeader("These permissions are ignored if the permission is set for a group or player.");
    this.permissionconfig.addHeader("Use the defaults as a base to keep the permissions file small");
    this.permissionconfig.addHeader("Need help with this file? Please visit:");
    this.permissionconfig.addHeader("http://dev.bukkit.org/server-mods/bkcommonlib/pages/general/permission-defaults/");

    // Load localization configuration
    this.localizationconfig = new FileConfiguration(this, "Localization.yml");
    // load
    if (this.localizationconfig.exists()) {
      this.loadLocalization();
    }
View Full Code Here

TOP

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

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.