Dying Wool

Discussion in 'Plugin Development' started by PizzaPixel, Mar 22, 2014.

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

    PizzaPixel

    I Cannot find how to dye a Material.Wool This is my code
    Code:java
    1. new ItemStack(Material.WOOL, 1)
    I have tryed this
    Code:java
    1. new ItemStack(Material.WOOL, 1, 2)
    I have also tried this
    Code:
    new ItemStack(Material.WOOL, DyeColor.Red)
    and this
    Code:java
    1. new ItemStack(Material.WOOL, 1 (Dyecolor.Red))
     
  2. Offline

    GameplayJDK

    PizzaPixel
    On blocks in the world you have to call setData(short), on ItemStacks you might have to use their ItemMeta....
     
  3. Offline

    willeb96

    ItemStack wool = new ItemStack(Material.WOOL);
    wool.setDurability(1);
     
  4. Offline

    PizzaPixel

    GameplayJDK How would i do that?

    willeb96 im doing something that has to be
    Code:
    new ItemStack(Material.WOOL, 1)
    
    i cant put this
    Code:
    ItemStack wool = new ItemStack(Material.WOOL);
    wool.setDurability(1);
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  5. Offline

    willeb96

    PizzaPixel
    Why not?

    Just put "wool" instead of "new ItemStack(Material.WOOL, 1)" where ever you need it.
     
  6. Offline

    PizzaPixel

    willeb96
    im doing an Icon Menu
    Code:java
    1. menu.setOption(4, new ItemStack(Material.WOOL, 1), "Green Team", "")
     
  7. Offline

    GameplayJDK

  8. Offline

    willeb96

    Code:java
    1. ItemStack wool = new ItemStack(Material.WOOL, 1);
    2. wool.setDurability(5);
    3. menu.setOption(4, wool, "Green Team", "");
     
  9. Offline

    Rocoty

    Code:java
    1. new ItemStack(Material.WOOL, 1, (byte) 1);
     
  10. Offline

    PizzaPixel

    Last edited by a moderator: Jun 7, 2016
  11. Offline

    GameplayJDK

  12. Offline

    AoH_Ruthless

Thread Status:
Not open for further replies.

Share This Page