[SPIGOT-2478] PlayerInteractEvent fires twice during the same tick when teleporting Created: 03/Jul/16 Updated: 05/Jul/16 |
|
Status: | Reopened |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Maximilian Micko | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 1 |
Labels: | 1.10 |
Description |
If you teleport the player while he uses an item in hand by right-clicking a block, the PlayerInteractEvent will fire twice, once as RIGHT_CLICK_BLOCK and once as RIGHT_CLICK_AIR. Demonstration: https://github.com/McDjuady/Mc-Interact-TP-Spike
All of this is done with only the Main Hand being passed to the listener |
Comments |
Comment by Maximilian Micko [ 04/Jul/16 ] |
I added ProtocolLib to the Test plugin to prove that the issue is serverside, not clientside. Here is whatis happening:
And so we get 2 PlayerInteractEvents from the same action. I hope this explanation was usefull Cheers |
Comment by md_5 [ 04/Jul/16 ] |
Interacts are fired purely on what the client does. |