1.15.2 PlayerInteractEvent being called twice with tools

Discussion in 'Spigot Plugin Development' started by Dramatically, Feb 18, 2020.

  1. It is being called twice and I have no clue why it is doing that.
    EDIT: Only occurs when you rightclick not leftclick and the event hashcode is different so different events are being called
    #1 Dramatically, Feb 18, 2020
    Last edited: Feb 18, 2020
  2. throw the event class code in,maybe ur not checking if the proper hand is being used? also rightclick fires twice(off hand/main hand)
  3. It’s because you have 2 hands that can fire the event.
    implement a check like this
    Code (Java):
    if(e.getHand() != EquipmentSlot.HAND) return;
    #3 Rawora, Feb 18, 2020
    Last edited: Feb 18, 2020
    • Agree Agree x 2