What is the material names of the vanilla dyes like "Lime Dye"?

Discussion in 'Plugin Development' started by FirecatHD, Feb 22, 2014.

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

    FirecatHD

    Title says it all, anyone have an answer?
    -Firecat
     
  2. Offline

    Gater12

    FirecatHD I think they are INK_SACS (or bone meal) with different durability/data.
     
  3. Offline

    FirecatHD

    Gater12 - How could i get the lime dye then?
     
  4. Offline

    Gater12

    FirecatHD
    You create an itemstack with Material.INK_SACK and set the data (or durability) of the lime dye.
     
  5. Offline

    FirecatHD

    Gater12 - I am sorry im a noob, but i am checking if the player is holding a lime dye, like this:
    Code:java
    1. if(p.getItemInHand().getType() == Material.INK_SACK) {


    Can you put in the code for me?
     
  6. Offline

    Gater12

    FirecatHD
    Code:java
    1. /* Lime dye ItemStack */
    2. Itemstack limeDye = new ItemStack(Material.INK_SACK, 1, (short) 10));
    3. /* Test if the item stack in the player's hand is equalled to the item stack limeDye */
    4. if(p.getItemInHand().equals(limeDye))
     
Thread Status:
Not open for further replies.

Share This Page