Taking item by item

Discussion in 'Plugin Development' started by iiHeroo, Nov 17, 2013.

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

    iiHeroo

    So say, a player gets 4 stone, and they right click, it takes one, and if they right click again, it takes another one. How do you do this?
     
  2. Offline

    Harmings

    Use PlayerInteractEvent, check if the action is a right click, check if the item in the players hand is stone, and then get the amount of the item the player has in there hand and subtract 1
     
    Newby likes this.
Thread Status:
Not open for further replies.

Share This Page