From 7a16af10788aae90a4be3506f2568a41334a886d Mon Sep 17 00:00:00 2001 From: Zrips Date: Thu, 15 Aug 2024 13:46:49 +0300 Subject: [PATCH] Defaulting to Stone in case GUI item is incorrectly setup --- src/main/java/com/gamingmesh/jobs/Gui/GuiItem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gamingmesh/jobs/Gui/GuiItem.java b/src/main/java/com/gamingmesh/jobs/Gui/GuiItem.java index 81652ef2..835f0b7a 100644 --- a/src/main/java/com/gamingmesh/jobs/Gui/GuiItem.java +++ b/src/main/java/com/gamingmesh/jobs/Gui/GuiItem.java @@ -3,6 +3,7 @@ package com.gamingmesh.jobs.Gui; import org.bukkit.inventory.ItemStack; import net.Zrips.CMILib.Container.CMINumber; +import net.Zrips.CMILib.Items.CMIMaterial; public class GuiItem { @@ -10,7 +11,7 @@ public class GuiItem { private int guiSlot = -1; public ItemStack getGuiItem() { - return guiItem; + return guiItem == null ? CMIMaterial.STONE.newItemStack() : guiItem; } public GuiItem setGuiItem(ItemStack guiItem) {