Very using the new api, some older versions are still used.
This commit is contained in:
parent
88817fb9a2
commit
fe7aabc6ea
@ -60,6 +60,7 @@ public class JailIO {
|
||||
}
|
||||
|
||||
/** Loads the language file from disk, if there is none then we save the default one. */
|
||||
@SuppressWarnings("deprecation")
|
||||
public void loadLanguage() {
|
||||
String language = pl.getConfig().getString("system.language");
|
||||
boolean save = false;
|
||||
@ -73,13 +74,13 @@ public class JailIO {
|
||||
}else {
|
||||
pl.getLogger().severe("The language file can not be a folder.");
|
||||
pl.getLogger().severe("As a result, we are reverting back to English as the language.");
|
||||
lang = YamlConfiguration.loadConfiguration(new InputStreamReader(pl.getResource("en.yml")));
|
||||
lang = YamlConfiguration.loadConfiguration(pl.getResource("en.yml"));
|
||||
save = true;
|
||||
}
|
||||
}else {
|
||||
pl.getLogger().warning("Loading the default language of: en");
|
||||
pl.getLogger().warning("If you wish to change this, please rename 'en.yml' to whatever you wish and set the config value to the name of the file.");
|
||||
lang = YamlConfiguration.loadConfiguration(new InputStreamReader(pl.getResource("en.yml")));
|
||||
lang = YamlConfiguration.loadConfiguration(pl.getResource("en.yml"));
|
||||
save = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user