Give dyed leather armor on command

Discussion in 'Plugin Development' started by youngbawss22, Nov 12, 2012.

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

    youngbawss22

    Hello everybody,

    I would like to give dyed leather armor on a command called "dressme". Right now i have all of the commands set up, however i would like to make the command "dressme" give me red leather armor, instead of regular brown armor. Does anybody know how i can do this?
     
  2. Offline

    Quintinity

  3. Offline

    youngbawss22

  4. Offline

    Krijn

    What about this?
    Code:java
    1. ItemStack name = new ItemStack(Material.LEATHER_CHESTPLATE);
    2. LeatherArmorMeta meta = (LeatherArmorMeta) name.getItemMeta();
    3. meta.setColor(Color.RED);
    4. name.setItemMeta(meta);


    Feel free to change the color, material and (meta)name. Good luck with your plugin
     
Thread Status:
Not open for further replies.

Share This Page