Check item has Lore before trying to use it
This commit is contained in:
parent
d1b6aee802
commit
8d12b8e565
@ -26,7 +26,10 @@ public class ShopItem extends CraftItemStack
|
|||||||
_deliveryName = deliveryName;
|
_deliveryName = deliveryName;
|
||||||
_displayItem = displayItem;
|
_displayItem = displayItem;
|
||||||
_deliveryAmount = deliveryAmount;
|
_deliveryAmount = deliveryAmount;
|
||||||
_lore = itemStack.getItemMeta().getLore().toArray(new String[0]);
|
if (itemStack.getItemMeta().hasLore())
|
||||||
|
_lore = itemStack.getItemMeta().getLore().toArray(new String[0]);
|
||||||
|
else
|
||||||
|
_lore = new String[0];
|
||||||
|
|
||||||
CraftItemStack craftItem = CraftItemStack.asCraftCopy(itemStack);
|
CraftItemStack craftItem = CraftItemStack.asCraftCopy(itemStack);
|
||||||
getHandle().tag = craftItem.getHandle().tag;
|
getHandle().tag = craftItem.getHandle().tag;
|
||||||
|
Loading…
Reference in New Issue
Block a user