Solved Getting the name of Rose Red dye.

Discussion in 'Plugin Development' started by thecerealkill3r, Nov 26, 2017.

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


    if(item.equals(new ItemStack(Material.INK_SACK, 1, (short) DyeColor.RED.getDyeData())))
                        p.sendMessage("rose red");
    This code does not work. If the player right clicks the item in main hand, then it should send a message saying "rose red". The problem is that I did not properly identify the Rose Red dye, but I'm not quite sure how I would.

  2. Offline


    Do value checks instead of full item checks. Check if the item.getType is an inksack, and that the item.getData is equal to the DyeColor instead of checking if every value is the same. What you currently have will only work if the player is holding one rose dye, any more and it will not work.
  3. Offline


  4. Offline


Thread Status:
Not open for further replies.

Share This Page