1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Update AutoEnchanter.java

This commit is contained in:
Rothes 2021-04-20 22:43:37 +08:00 committed by GitHub
parent 2b3658a724
commit 837afab0db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,10 +135,13 @@ public class AutoEnchanter extends AContainer {
return false;
} else {
ItemMeta itemMeta = item.getItemMeta();
if (itemMeta != null && itemMeta.hasLore()) {
for (String lore : cantEnchantLores.getValue()) {
if (itemMeta.getLore().contains(ChatColors.color(lore))) {
return false;
if (itemMeta != null) {
List<String> lores = itemMeta.getLore();
if (lores != null) {
for (String lore : cantEnchantLores.getValue()) {
if (lore.contains(ChatColors.color(lore))) {
return false;
}
}
}
}