/** * Loads the configuration from disk * * @return True if loaded successfully */ public final boolean load() { try { load(file); return true; } catch (Exception ex) { return false; } }
public Settings(Plugin plugin) { // super(new File(Settings.PLUGIN_FOLDER + "/config.yml"), this.plugin); this.file = new File(plugin.getDataFolder(), "config.yml"); this.plugin = plugin; // options().indent(4); // Override to always indent 4 spaces if (exists()) { load(); } else { loadDefaults(file.getName()); load(); } configFile = (YamlConfiguration) plugin.getConfig(); // saveDefaults(); }
public final void reload() { load(); loadDefaults(file.getName()); }