From 8d12b8e565c42a380584a569473c5ea1da1af210 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 28 Nov 2014 09:30:27 +1300 Subject: [PATCH] Check item has Lore before trying to use it --- .../Mineplex.Core/src/mineplex/core/shop/item/ShopItem.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/shop/item/ShopItem.java b/Plugins/Mineplex.Core/src/mineplex/core/shop/item/ShopItem.java index 669fb6663..9803f670b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/shop/item/ShopItem.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/shop/item/ShopItem.java @@ -26,7 +26,10 @@ public class ShopItem extends CraftItemStack _deliveryName = deliveryName; _displayItem = displayItem; _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); getHandle().tag = craftItem.getHandle().tag;