1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00

When enchant fails, lets skip it

This commit is contained in:
Zrips 2023-10-16 23:35:40 +03:00
parent e364609ec7
commit 957669cb7a

View File

@ -434,7 +434,13 @@ public class NameTranslatorManager {
ConfigurationSection enchSection = c.getC().getConfigurationSection("EnchantList"); ConfigurationSection enchSection = c.getC().getConfigurationSection("EnchantList");
for (Enchantment one : Enchantment.values()) { for (Enchantment one : Enchantment.values()) {
String enchName = CMIEnchantment.getName(one); String enchName = "Unknown";
try {
enchName = CMIEnchantment.getName(one);
} catch (Throwable e) {
// If enchant check failed we can skip this entirely
continue;
}
if (enchName.equals("Unknown")) if (enchName.equals("Unknown"))
continue; continue;