mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Update src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/enchanting/AutoEnchanter.java
Co-authored-by: Riley <69326411+Mooy1@users.noreply.github.com>
This commit is contained in:
parent
837afab0db
commit
807c442930
@ -133,19 +133,17 @@ public class AutoEnchanter extends AContainer {
|
||||
private boolean isEnchantable(@Nullable ItemStack item) {
|
||||
if (item == null) {
|
||||
return false;
|
||||
} else {
|
||||
ItemMeta itemMeta = item.getItemMeta();
|
||||
if (itemMeta != null) {
|
||||
List<String> lores = itemMeta.getLore();
|
||||
}
|
||||
if (item.hasItemMeta()) {
|
||||
List<String> lores = item.getItemMeta().getLore();
|
||||
if (lores != null) {
|
||||
for (String lore : cantEnchantLores.getValue()) {
|
||||
if (lore.contains(ChatColors.color(lore))) {
|
||||
if (lores.contains(ChatColors.color(lore))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// stops endless checks of getByItem for enchanted book stacks.
|
||||
if (item.getType() != Material.ENCHANTED_BOOK) {
|
||||
SlimefunItem sfItem = SlimefunItem.getByItem(item);
|
||||
|
Loading…
Reference in New Issue
Block a user