Package org.bukkit.util.config

Examples of org.bukkit.util.config.Configuration


  }

  public synchronized boolean updateYAML() {
    if (cached == null) {
      // Setup cached processor
      cached = new Configuration(localCache);
      cached.load();
      return true;
    }
    return false;
  }
View Full Code Here


    if (!file.exists()) {
      try {
        file.createNewFile();
      } catch (IOException e) { }
    }
    config = new Configuration(file);
    if (load) {
      config.load();
      enabled = config.getBoolean("minimap.visible", enabled);
      coords = config.getBoolean("minimap.coords", coords);
      zoom = config.getInt("minimap.zoom", zoom);
View Full Code Here

    }

    public boolean loadWorld(String world) {
        // log.info("Checking for the world: " + world);
        if(!this.Worlds.contains(world)) {
            this.load(world, new Configuration(new File(this.directory + File.separator + world + ".yml")));
            log.info("Loaded world: " + world);
           return true;
        }

        // log.info("World already exists: " + world);
View Full Code Here

        // log.info("World already exists: " + world);
        return false;
    }
   
    public void forceLoadWorld(String world) {
        this.load(world, new Configuration(new File(this.directory + File.separator + world + ".yml")));
    }
View Full Code Here

        // Attempt
        if (!(new File(getDataFolder(), DefaultWorld + ".yml").exists())) {
            Misc.touch(DefaultWorld + ".yml");
        }

        Configuration configure = new Configuration(new File(getDataFolder(), DefaultWorld + ".yml"));
        configure.load();

        // Gogo
        this.config = new ConfigurationHandler(configure);

        // Setup Permission
View Full Code Here

    public PermissionHandler getHandler() {
        return Security;
    }

    public void setupPermissions() {
        Security = new Control(new Configuration(new File("plugins" + File.separator + "Permissions", DefaultWorld + ".yml")));
        Security.setDefaultWorld(DefaultWorld);
        Security.setDirectory(new File("plugins" + File.separator + "Permissions"));
        Security.load();
    }
View Full Code Here

  public World world;
  public ArrayList<Section> sections;
  public int currentSection;

  public QuestHandler(World world, File file) {
    config = new Configuration(file);
    this.world = world;
    if (file.exists())
      load();
    else {
      try {
View Full Code Here

    public void configLoading() {
        File dataFolder = new File(testFolder,"configLoading");
        dataFolder.mkdirs();
        File settingsFile =new File(dataFolder,"BigBrother.yml");
       
        Configuration cfg = new Configuration(settingsFile);
        cfg.setProperty("database.type", "MYSQL");
        cfg.save();

        BBSettings.initialize(dataFolder);
       
        Assert.assertTrue("Configuration didn't get saved.",BBSettings.usingDBMS(DBMS.MYSQL));
    }
View Full Code Here

TOP

Related Classes of org.bukkit.util.config.Configuration

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.