Config-Updater
Config-Updater copied to clipboard
Allow UTF-8 Charset
Not really an issue more of just an added bonus, I noticed that Chinese characters weren't being saved over from config updates and that's because when you are loading the current config you don't load it with UTF-8 charset. So to fix this just change this one line here:
FileConfiguration currentConfig = YamlConfiguration.loadConfiguration(toUpdate); at this line
To this:
FileConfiguration currentConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(FileUtils.openInputStream(toUpdate), StandardCharsets.UTF_8));
This uses the apache file utils class.