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
commit cf2b743e2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}