Events are fired twice
LadyCailinBot opened this issue ยท 5 comments
CMDHELPER-3134 - Reported by bexco2010
on 1.9 spigot(lastest build, maybe some old build too), CommandHelper is fire event twice, I think it's not only CommandHelper's problem.
because old build of CommandHelper(not "very" old build) is fire event twice too.(these builds are works well with 1.8 spigot)
Please fix this. Thanks.
Comment by PseudoKnight
Which events? If you're talking about player_interact, this is normal. It sometimes fire for both the main_hand and off_hand. Sometimes it just fires for one of the hands.
Comment by bexco2010
Events I checked:
block_break
block_place
player_interact
player_interact_entity
player_interact_at_entity
Comment by PseudoKnight
I didn't know it affected the block_break/block_place events. This might be some other spigot issue. If this is normal behavior for 1.9 now, then we might need to add hand data for those events as well. If not, then it'd be a spigot bug and there's nothing we can do. I'll look into this sometime. For what it's worth, I haven't experienced this with block_break/place.
Comment by PseudoKnight
I confirmed this for player_interact_entity, and realized the hand event data doesn't exist for that event either. I'll need to fix that.
Comment by PseudoKnight
I could never reproduce double events with block_place/break, but this is fixed in player_interact_entity and player_interact_at_entity. player_interact was already fixed when this issue was posted. By "fixed" I mean the hand is specified in the event. So when it double fires you can check which hand it is. This makes coding for Minecraft interactions more difficult, but there's no way around it post Minecraft 1.9.