ItemStack data/durability

Discussion in 'Plugin Development' started by Door Knob, Dec 22, 2013.

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

    Door Knob

    Hello there. I'm trying to check if a player has an item in his inventory, that has a respectful ID and DATA. It works fine, but if you set the item to be an item like flint and steel, it will not work correctly as I can't use durability for data anymore.

    This is how I'm checking it. It works fine for items that don't have durability, like I said. But for a flint and steel it breaks. I need to know how I can skip straight to the (byte) data parameter, without using the (short) durability parameter.
    PHP:
    player.getInventory().contains(new ItemStack(Material.getMaterial(lighter_id), (short)lighter_data))
     
Thread Status:
Not open for further replies.

Share This Page