hey, Ive got a code for some nice glass panes in an inventory, but I want them to be blue. How can i fix this? this is my code as far as I am now. Code (Text): ItemStack panes = nameItem(Material.STAINED_GLASS_PANES, "divider"); } private static ItemStack nameItem(ItemStack item, String name) { ItemMeta meta = item.getItemMeta(); meta.setDisplayName(name); item.setItemMeta(meta); return item; } private static ItemStack nameItem(Material item, String name) { return nameItem(new ItemStack(item), name); } Thank you for helping!
Code (Text): item.setDurability((short) 3); the durability of a light blue glass pane is 3 a blue one is 11
Some items, like glass panes and colored clay blocks, carry a data value as well as a Material value. It looks like 11 is the data value you're looking for here (wiki). So: Code (Text): new ItemStack(Material.STAINED_GLASS_PANE, 1, (byte)11)