fix null...

Signed-off-by: j502647092 <jtb1@163.com>
pull/1/MERGE
j502647092 2015-07-25 18:14:09 +08:00
parent 4b3c164a93
commit 6dea0ada1f
1 changed files with 3 additions and 2 deletions

View File

@ -132,16 +132,17 @@ public class ItemsConfig extends ConfigLoader {
public boolean isActionItem(ItemStack itemStack, ActionType actionType) {
for (SoulbindItem soulbindItem : getSoulbindItems(actionType)) {
if (itemStack.getData().equals(soulbindItem.getMaterialData())) {
if (itemStack.hasItemMeta()) {
ItemMeta itemMeta = itemStack.getItemMeta();
if (soulbindItem.getName() != null) {
if (soulbindItem.getName() != null)
if (itemMeta.getDisplayName().contains(soulbindItem.getName()))
if (soulbindItem.getLore() != null && !soulbindItem.getLore().isEmpty())
if (itemMeta.hasLore()
&& itemMeta.getLore().containsAll(soulbindItem.getLore()))
return true;
}
}
}
}