diff --git a/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java b/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java index 9f7c2b0..b66d610 100644 --- a/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java +++ b/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java @@ -89,11 +89,17 @@ public class SWItem { @SuppressWarnings("deprecation") public SWItem(Material material, byte meta, String name, List lore, boolean enchanted, InvCallback c) { - try { - itemStack = new ItemStack(material, 1, (short)0, meta); - } catch (IllegalArgumentException e) { - itemStack = new ItemStack(material, 1); + + if(material != null) { + try { + itemStack = new ItemStack(material, 1, (short) 0, meta); + } catch (IllegalArgumentException e) { + itemStack = new ItemStack(material, 1); + } + }else { + itemStack = new ItemStack(Material.BARRIER, 1); } + itemMeta = itemStack.getItemMeta(); if (itemMeta != null) { diff --git a/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java b/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java index 4af18cf..0f6ba59 100644 --- a/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java +++ b/SpigotCore_Main/src/de/steamwar/inventory/SchematicSelector.java @@ -235,10 +235,6 @@ public class SchematicSelector { private SWListInv.SWListEntry renderItem(SchematicNode node) { Material m = SWItem.getMaterial(node.getItem()); - if(m == null) { - m = Material.BARRIER; - } - String name = Core.MESSAGE.parse(filter.name == null?"SCHEM_SELECTOR_ITEM_NAME":"SCHEM_SELECTOR_ITEM_NAME_FILTER", player, node.getName()); if(filter.getName() != null) {