mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Avoiding enchantments which could produce empty path link
This commit is contained in:
parent
ad577e60ff
commit
d0c36fc246
@ -434,15 +434,18 @@ public class NameTranslatorManager {
|
||||
|
||||
ConfigurationSection enchSection = c.getC().getConfigurationSection("EnchantList");
|
||||
for (Enchantment one : Enchantment.values()) {
|
||||
String enchName = "Unknown";
|
||||
String enchName = "";
|
||||
try {
|
||||
enchName = CMIEnchantment.getName(one);
|
||||
} catch (Throwable e) {
|
||||
// If enchant check failed we can skip this entirely
|
||||
continue;
|
||||
}
|
||||
if (enchName.equals("Unknown"))
|
||||
|
||||
if (enchName.isEmpty()) {
|
||||
CMIMessages.consoleMessage("Could not identify enchantment: " + one.toString());
|
||||
continue;
|
||||
}
|
||||
|
||||
String name = enchName;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user