Solved InventoryClickEvent & Byte Data

Discussion in 'Plugin Development' started by Pink__Slime, May 24, 2013.

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

    Pink__Slime

    I'm working on a new plugin for shops and I have Lapis in my menu. How would I check if it was clicked?
    I'm currently using
    Code:java
    1. if(item.getType().equals(Material.INK_SACK)){

    but using that, I can't get the byte data that I'm aware of. I've probably been staring right at it and not noticing but can someone please help me with this one?
    Thanks. :)
     
  2. Offline

    ase34

    You can do ((Dye)item.getData()).getColor() == DyeColor.BLUE or if you want to use data numbers: item.getDurability() == (short) 4
     
    Pink__Slime likes this.
  3. Offline

    Pink__Slime

Thread Status:
Not open for further replies.

Share This Page