From 0e6a8afbb7c714f4d6db9814de4863cbc0990ccf Mon Sep 17 00:00:00 2001 From: Zrips Date: Sat, 25 Apr 2020 12:03:19 +0300 Subject: [PATCH] Lets check by more air types --- src/main/java/com/gamingmesh/jobs/CMIGUI/CMIGui.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/CMIGUI/CMIGui.java b/src/main/java/com/gamingmesh/jobs/CMIGUI/CMIGui.java index 4601762f..a2ba95da 100644 --- a/src/main/java/com/gamingmesh/jobs/CMIGUI/CMIGui.java +++ b/src/main/java/com/gamingmesh/jobs/CMIGUI/CMIGui.java @@ -228,10 +228,12 @@ public class CMIGui { public void addEmptyButton(int slot) { ItemStack MiscInfo = filler.newItemStack(); - if (!MiscInfo.getType().equals(org.bukkit.Material.AIR)) { + if (!CMIMaterial.isAir(MiscInfo.getType())) { ItemMeta MiscInfoMeta = MiscInfo.getItemMeta(); - MiscInfoMeta.setDisplayName(" "); - MiscInfo.setItemMeta(MiscInfoMeta); + if (MiscInfoMeta != null) { + MiscInfoMeta.setDisplayName(" "); + MiscInfo.setItemMeta(MiscInfoMeta); + } } addButton(new CMIGuiButton(slot, GUIFieldType.Locked, MiscInfo)); }