1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-04 23:37:49 +01:00

Lets print stack trace and provide better information what happen

This commit is contained in:
Zrips 2018-10-16 13:53:24 +03:00
parent 4af999b7cc
commit 85ec42abb7

View File

@ -64,12 +64,13 @@ public class Language {
String msg = "";
try {
if (customlocale == null || !customlocale.contains(key))
msg = enlocale.contains(key) == true ? Colors(enlocale.getString(key)) : missing;
msg = enlocale.isString(key) ? Colors(enlocale.getString(key)) : missing;
else
msg = customlocale.contains(key) == true ? Colors(customlocale.getString(key)) : missing;
msg = customlocale.isString(key) ? Colors(customlocale.getString(key)) : missing;
} catch (Exception e) {
Bukkit.getServer().getConsoleSender().sendMessage(Colors("&e[Jobs] &2Can't read language file. Plugin will be disabled."));
Bukkit.getServer().getConsoleSender().sendMessage(Colors("&e[Jobs] &2Can't read language file for: " + key));
Bukkit.getServer().getPluginManager().disablePlugin(plugin);
e.printStackTrace();
throw e;
}
if (variables.length > 0)