Developer

For Developer

To use the Java file type:

File file = new File("plugins/CustomPlayerPoints", "config.yml");
FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
File shop = new File("plugins/CustomPlayerPoints", "shop.yml");
FileConfiguration cfg2 = YamlConfiguration.loadConfiguration(file);
File players = new File("plugins/CustomPlayerPoints", "players.yml");
FileConfiguration cfg1 = YamlConfiguration.loadConfiguration(file);

To get ints/Strings or booleans type:

cfg.getInt/Boolean/String(path);
cfg1.getInt/Boolean/String(path);
cfg2.getInt/Boolean/String(path);

To add ints/Strings or booleans type:

cfg/cfg1/cfg2.addDefault(path, int/boolean/String);
try {
cfg.save(file/shop/players);
} catch (IOException e) {
e.printStackTrace();
}

To set ints/String or booleans type:

cfg/cfg1/cfg2.set(path, String/int/boolean);
try {
cfg.save(file/players/shop);
} catch (IOException e) {
e.printStackTrace();
}

Have fun :)


Comments

Posts Quoted:
Reply
Clear All Quotes