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

Update AutoDisenchanter.java

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

View File

@ -153,14 +153,17 @@ public class AutoDisenchanter extends AContainer {
return false;
} else {
ItemMeta itemMeta = item.getItemMeta();
if (itemMeta != null && itemMeta.hasLore()) {
if (itemMeta != null) {
List<String> lores = itemMeta.getLore();
if (lores != null) {
for (String lore : cantDisenchantLores.getValue()) {
if (itemMeta.getLore().contains(ChatColors.color(lore))) {
if (lores.contains(ChatColors.color(lore))) {
return false;
}
}
}
}
}
if (item.getType() != Material.BOOK) {
// ^ This stops endless checks of getByItem for books
SlimefunItem sfItem = SlimefunItem.getByItem(item);