Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cfg = new File(this.getDataFolder().getPath() + File.separator + "config.yml");
- File file = new File(this.getDataFolder().getPath());
- if(!file.exists()) {
- file.mkdir();
- }
- if(!cfg.exists()){
- try {
- cfg.createNewFile();
- yml.set("defaultFile", "default");
- yml.set("extension", "txt");
- yml.set("debugMode", false);
- yml.set("permissions.read", "helperbot.read");
- yml.set("permissions.addhelp", "helperbot.addhelp");
- yml.set("permissions.remhelp", "helperbot.remhelp");
- yml.save(cfg);
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- } else {
- yml = YamlConfiguration.loadConfiguration(cfg);
- }
Add Comment
Please, Sign In to add comment