1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-06 16:27:59 +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 = ""; String msg = "";
try { try {
if (customlocale == null || !customlocale.contains(key)) 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 else
msg = customlocale.contains(key) == true ? Colors(customlocale.getString(key)) : missing; msg = customlocale.isString(key) ? Colors(customlocale.getString(key)) : missing;
} catch (Exception e) { } 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); Bukkit.getServer().getPluginManager().disablePlugin(plugin);
e.printStackTrace();
throw e; throw e;
} }
if (variables.length > 0) if (variables.length > 0)