need help with item cheking

Discussion in 'Plugin Development' started by Hellfish, Jan 15, 2011.

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

    Hellfish

    hi i am working on converting my plugin FunHats to java, ad all went good
    until i came to the point where my plugin checkt if you have a item in your hand.
    I used to do= if (hand > 255) but that doesn't work anymore.
    The only similar thing that works is: if(hand.equals(256)), but I do not want to do that for every existing item.
    Dose anyone know a more elegant solution?
     
  2. Where are you getting the value in "hand" from?
     
  3. Offline

    Hellfish

    edit: i got the variable hand from checking the players hand (what item he holds)

    ok sorry i didn't look longer because now i have the answer already.
    I used:
    int inhand = hand.getTypeID();

    and then checked with the variable inhand
     
Thread Status:
Not open for further replies.

Share This Page