This commit is contained in:
PikaMug 2023-01-25 21:45:59 -05:00
parent aa4d7b6d3d
commit 20bbd3d6e8

View File

@ -225,8 +225,17 @@ public class Lang {
allStrings.put(key, config.getString(key)); allStrings.put(key, config.getString(key));
} }
} }
final FileConfiguration config= YamlConfiguration FileConfiguration config = null;
try {
config = YamlConfiguration
.loadConfiguration(new InputStreamReader(new FileInputStream(langFile), StandardCharsets.UTF_8)); .loadConfiguration(new InputStreamReader(new FileInputStream(langFile), StandardCharsets.UTF_8));
} catch (Exception e) {
plugin.getPluginLogger().severe("Unable to load config for language " + iso);
e.printStackTrace();
}
if (config == null) {
return;
}
FileConfiguration config_new = null; FileConfiguration config_new = null;
if (exists_new) { if (exists_new) {
config_new = YamlConfiguration.loadConfiguration(new InputStreamReader( config_new = YamlConfiguration.loadConfiguration(new InputStreamReader(