From 1fdb18dfe1930bb3c2c20805e75794a51d23b7e0 Mon Sep 17 00:00:00 2001 From: Zrips Date: Thu, 15 Aug 2024 14:08:26 +0300 Subject: [PATCH] Defaulting to Stone for icon --- src/main/java/com/gamingmesh/jobs/container/ShopItem.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/container/ShopItem.java b/src/main/java/com/gamingmesh/jobs/container/ShopItem.java index 6fe350d3..619adc59 100644 --- a/src/main/java/com/gamingmesh/jobs/container/ShopItem.java +++ b/src/main/java/com/gamingmesh/jobs/container/ShopItem.java @@ -10,6 +10,7 @@ import org.bukkit.inventory.ItemStack; import net.Zrips.CMILib.Items.CMIAsyncHead; import net.Zrips.CMILib.Items.CMIItemStack; +import net.Zrips.CMILib.Items.CMIMaterial; public class ShopItem { @@ -37,9 +38,10 @@ public class ShopItem { // private boolean useCurrentPlayer = false; private String iconString; - + public CMIItemStack getIcon(Player player, CMIAsyncHead ahead) { - return CMIItemStack.deserialize(iconString.replace("[player]", player.getName()), ahead); + CMIItemStack stack = CMIItemStack.deserialize(iconString.replace("[player]", player.getName()), ahead); + return stack == null ? CMIMaterial.STONE.newCMIItemStack() : stack; } public ShopItem(String nodeName) {