How to add datavalues to a dye?

Discussion in 'Plugin Development' started by MrTurtle, Aug 28, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    MrTurtle

    Hello I wanted to know how I could add a datavalue to a dye I need the dye to have a datavalue because in my plugin Light blue dye is "Mana" but if I put it in a crafting table next to wool it will change the wool to light blue wool and I dont want that so I want it to have a datavalue to it wont do that

    This is my itemstack
    Code:java
    1.  
    2. ItemStack Mana = new ItemStack(Material.INK_SACK, 1, (short) 12);
    3. {
    4. ItemMeta itemmeta8 = Mana.getItemMeta();
    5. itemmeta8.setDisplayName(ChatColor.AQUA + "Mana");
    6. Mana.setItemMeta(itemmeta8);
    7. }
    8.  
     
  2. mana.setDamage(10);
    That should work, maybe you need to cast the 10 to something else like a short, but it works with me.
     
Thread Status:
Not open for further replies.

Share This Page