PlayerItemEvent question

Discussion in 'Plugin Development' started by fullwall, Jan 30, 2011.

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

    fullwall

    As an addition to my plugin, I wanted to deal with hunger for blocks, ie. if you set a value for a block, a variable goes down by that number if you use that block, and you lose one off the block stack. However, I'm not sure how to check if a block is being used at thin air, not placed.

    If a block is placed, does it call BlockPlacedEvent as well as PlayerItemEvent? I wanted to only reduce the variable if a block is used while looking into air, otherwise players would lose 2 blocks off the stack if it was placed (1 from my plugin, 1 from placing). So, is there an event that would only trigger if a block was used and not placed?

    If there isn't an event that has that property, what is the best way to do this?

    Thanks in advance.
     
Thread Status:
Not open for further replies.

Share This Page