Check item has Lore before trying to use it

This commit is contained in:
libraryaddict 2014-11-28 09:30:27 +13:00
parent d1b6aee802
commit 8d12b8e565

View File

@ -26,7 +26,10 @@ public class ShopItem extends CraftItemStack
_deliveryName = deliveryName;
_displayItem = displayItem;
_deliveryAmount = deliveryAmount;
if (itemStack.getItemMeta().hasLore())
_lore = itemStack.getItemMeta().getLore().toArray(new String[0]);
else
_lore = new String[0];
CraftItemStack craftItem = CraftItemStack.asCraftCopy(itemStack);
getHandle().tag = craftItem.getHandle().tag;