ItemStack keeps giving me 1 extra item when it's set to 1...

Discussion in 'Plugin Development' started by Shuski, Jan 9, 2017.

Thread Status:
Not open for further replies.
  1. I seem to be having a strange problem with giving a player a Lapis Block. I have a video and the code to show what's going on, but basically I'm getting 2 lapis blocks back...even though the variable is set to 1...

    http://pastebin.com/aCy3kdgQ

     
  2. If you using a click action, it counts main hand and off hand resulting in the action occurring twice.


    Sent from my iPhone using Tapatalk
     
  3. Offline

    Zombie_Striker

    @Shuski
    Adding onto what @TheEnderman posted, check if the clicked hand is equal to the main hand. By doing that, the offhand will not trigger the code, meaning it will only trigger the code once.
     
Thread Status:
Not open for further replies.

Share This Page