@Override public YamlConfigurationOptions pathSeparator(char value) { super.pathSeparator(value); return this; }
@Override public YamlConfigurationOptions pathSeparator(char value) { super.pathSeparator(value); return this; }
private FileConfiguration loadMain() throws SkyConfigurationException { FileConfiguration config = new YamlConfiguration(); config.options().pathSeparator('%'); try { config.load(configFile.toFile()); } catch (IOException ex) { throw new SkyConfigurationException("IOException loading messages file " + configFile.toAbsolutePath(), ex); } catch (InvalidConfigurationException ex) { throw new SkyConfigurationException("Messages file " + configFile.toAbsolutePath() + " is invalid", ex); } return config; }
private void ensureConfigIsPrepared() { this.configWorlds.options().pathSeparator(SEPARATOR); if (this.configWorlds.getConfigurationSection("worlds") == null) { this.configWorlds.createSection("worlds"); } }
/** * {@inheritDoc} */ @Override public boolean saveWorldsConfig() { try { this.configWorlds.options().pathSeparator(SEPARATOR); this.configWorlds.set("worlds", null); for (Map.Entry<String, WorldProperties> entry : worldsFromTheConfig.entrySet()) { this.configWorlds.set("worlds" + SEPARATOR + entry.getKey(), entry.getValue()); } this.configWorlds.save(new File(this.plugin.getDataFolder(), "worlds.yml")); return true; } catch (IOException e) { this.plugin.log(Level.SEVERE, "Could not save worlds.yml. Please check your settings."); return false; } }
header = String.format(NEW_MESSAGES_FILE_HEADER_LANGUAGE_DIFFERENT, language); newConfig.options().pathSeparator('%').header(header); for (TransKey key : TransKey.values()) { newConfig.set(key.key, internal.get(key));
wconf.options().pathSeparator(PATH_SEPARATOR); File worldsFile = new File(getDataFolder(), "worlds.yml"); try {