public void reloadConfig() { YamlConfig = new YamlConfiguration(); YamlConfig.options().pathSeparator('.'); try { YamlConfig.load(configFile); } catch (Exception e) { plugin.getLogger().warning("Unable to load commands.yml: " + e.getMessage()); } }
public void saveConfig() { try { YamlConfig.save(configFile); } catch (Exception e) { plugin.getLogger().info("Failed to save commands.yml: " + e.getMessage()); } }
protected void refreshConfig() { try { YamlConfig.save(configFile); reloadConfig(); } catch (IOException e) { plugin.getLogger().warning("Failed to write changed commands.yml: " + e.getMessage()); } }