From e729c9455cc36e96c1570bb5fbc0e709ec96a044 Mon Sep 17 00:00:00 2001 From: Fernando Pettinelli Date: Sat, 16 Oct 2021 21:25:16 -0300 Subject: [PATCH] Check if material is AIR. --- src/main/java/com/songoda/ultimatestacker/UltimateStacker.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/songoda/ultimatestacker/UltimateStacker.java b/src/main/java/com/songoda/ultimatestacker/UltimateStacker.java index 5756dd8..29933c2 100644 --- a/src/main/java/com/songoda/ultimatestacker/UltimateStacker.java +++ b/src/main/java/com/songoda/ultimatestacker/UltimateStacker.java @@ -411,6 +411,9 @@ public class UltimateStacker extends SongodaPlugin { public static void updateItemMeta(Item item, ItemStack itemStack, int newAmount) { Material material = itemStack.getType(); + if (material == Material.AIR) + return; + String name = TextUtils.convertToInvisibleString("IS") + Methods.compileItemName(itemStack, newAmount); boolean blacklisted = isMaterialBlacklisted(itemStack);