Check item on hand?

Discussion in 'Plugin Development' started by Cr4zy[Box], Feb 9, 2013.

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

    Cr4zy[Box]

    I wanna check the current item on his hand, any help?
     
  2. Offline

    chasechocolate

    ItemStack hand = player.getItemInHand();
     
    Cr4zy[Box] likes this.
  3. Offline

    CubixCoders

    ItemStack item = player.getItemInHand();
    if(item.getType() == Material.Whatever){}?

    chasechocolate
    Darn you sneaky ninjas

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  4. Offline

    chasechocolate

  5. Offline

    alf980103

    Thanks, this worked for me :D
     
Thread Status:
Not open for further replies.

Share This Page