[SPIGOT-2818] PlayerInteractEvent run twice !! Created: 21/Nov/16  Updated: 11/Dec/17  Resolved: 21/Nov/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Alex Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: Bug, Error, Help, PlayerInteractEvent, runtwice

Plugin: -

 Description   

I use the new version 1.11 . And now if i use the PlayerInteractEvent then it run twice. I look on my Code 5 hours and cant find a mistake. It is this a bug ?



 Comments   
Comment by wysohn [ 22/Nov/16 ]

sweet

I haven't know why interact event is called twice until now

I had to use timer to control it

never thought about two hand

Comment by Anonymous Chicken [ 22/Nov/16 ]

It runs twice because the player technically interacts twice – Once with each hand. Check the hand with getHand() and make sure it is the hand you want to check for.

Comment by rypofalem [ 21/Nov/16 ]

The event happens up to once per hand, depending on what you are holding and what you click. You can use PlayerInteractEvent.getHand() to see which hand is interacting.

Comment by md_5 [ 21/Nov/16 ]

Two hands

Generated at Sat Apr 05 09:04:19 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.