Solved ItemStack Color WOOL SetDisplayName

Discussion in 'Spigot Plugin Development' started by Frealy1995, May 14, 2016.

  1. Code (Text):

    ItemStack freeKit = new ItemStack(Material.WOOL, 1, (byte) 5);
                    ItemMeta freeKitMeta = freeKit.getItemMeta();
                    freeKitMeta.setDisplayName(ChatColor.GRAY + "Spigot");
     
    And game test a Name: Lime Wool
     
  2. freeKit.setItemMeta(freeKitMeta);...

    Otherwise you won't be changing anything ;)
     
    • Like Like x 1
  3. Okay ehm
    You need to do freeKit.setItemMeta(freeKitMeta) after you've set the display-name
     
    • Like Like x 1