diff --git a/src/main/java/io/github/tanguygab/tabadditions/shared/features/UnlimitedItemLines.java b/src/main/java/io/github/tanguygab/tabadditions/shared/features/UnlimitedItemLines.java index a7b14b7..90a2071 100644 --- a/src/main/java/io/github/tanguygab/tabadditions/shared/features/UnlimitedItemLines.java +++ b/src/main/java/io/github/tanguygab/tabadditions/shared/features/UnlimitedItemLines.java @@ -69,12 +69,12 @@ public void onWorldChange(TabPlayer p, String from, String to) { public BukkitItemLine createItemLine(TabPlayer p, ArmorStand as) { Property prop = as.getProperty(); prop.changeRawValue(prop.getOriginalRawValue().replace("ITEM:","")); + boolean glow = false; if (prop.getFormat(p).contains(",glow")) { glow = true; prop.changeRawValue(prop.getOriginalRawValue().replace(",glow","")); } - if (Material.getMaterial(prop.getFormat(p)) == null) return null; return new BukkitItemLine(as.getEntityId(),p,prop,as.getOffset(),as.hasStaticOffset(),glow); } diff --git a/src/main/java/io/github/tanguygab/tabadditions/spigot/BukkitItemLine.java b/src/main/java/io/github/tanguygab/tabadditions/spigot/BukkitItemLine.java index 9735e1a..7a8de7b 100644 --- a/src/main/java/io/github/tanguygab/tabadditions/spigot/BukkitItemLine.java +++ b/src/main/java/io/github/tanguygab/tabadditions/spigot/BukkitItemLine.java @@ -33,6 +33,7 @@ public BukkitItemLine(int entityId, TabPlayer owner, Property property, double y @Override public Object[] getSpawnPackets(TabPlayer viewer) { Material mat = Material.getMaterial(prop.getFormat(viewer)); + if (mat == null) mat = Material.AIR; ItemStack itemStack = new ItemStack(mat); Player p = (Player) viewer.getPlayer(); if (glow)