mirror of
https://e.coding.net/circlecloud/Soulbound.git
synced 2025-11-25 21:46:20 +00:00
@@ -132,16 +132,17 @@ public class ItemsConfig extends ConfigLoader {
|
|||||||
|
|
||||||
public boolean isActionItem(ItemStack itemStack, ActionType actionType) {
|
public boolean isActionItem(ItemStack itemStack, ActionType actionType) {
|
||||||
for (SoulbindItem soulbindItem : getSoulbindItems(actionType)) {
|
for (SoulbindItem soulbindItem : getSoulbindItems(actionType)) {
|
||||||
|
|
||||||
if (itemStack.getData().equals(soulbindItem.getMaterialData())) {
|
if (itemStack.getData().equals(soulbindItem.getMaterialData())) {
|
||||||
if (itemStack.hasItemMeta()) {
|
if (itemStack.hasItemMeta()) {
|
||||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||||
if (soulbindItem.getName() != null) {
|
if (soulbindItem.getName() != null)
|
||||||
if (itemMeta.getDisplayName().contains(soulbindItem.getName()))
|
if (itemMeta.getDisplayName().contains(soulbindItem.getName()))
|
||||||
if (soulbindItem.getLore() != null && !soulbindItem.getLore().isEmpty())
|
if (soulbindItem.getLore() != null && !soulbindItem.getLore().isEmpty())
|
||||||
if (itemMeta.hasLore()
|
if (itemMeta.hasLore()
|
||||||
&& itemMeta.getLore().containsAll(soulbindItem.getLore()))
|
&& itemMeta.getLore().containsAll(soulbindItem.getLore()))
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user