Merge pull request #84

Fix error hard-disable
This commit is contained in:
Will FP
2021-10-06 10:43:19 +01:00
committed by GitHub

View File

@@ -63,7 +63,9 @@ public class EnchantmentConfig extends YamlExtendableConfig {
Set<Enchantment> enchantments = new HashSet<>();
List<String> enchantmentKeys = this.getStrings(path);
for (String key : enchantmentKeys) {
enchantments.add(Enchantment.getByKey(NamespacedKey.minecraft(key)));
if (Enchantment.getByKey(NamespacedKey.minecraft(key)) != null) {
enchantments.add(Enchantment.getByKey(NamespacedKey.minecraft(key)));
}
}
return enchantments;
}