TriggerReactor

TriggerReactor

24.6k Downloads

PlayerDeathEvent called twice

wysohn opened this issue ยท 2 comments

commented

NightSky - Today at 3:52 AM
Well to sate my curiosity I compiled a modified version of Spigot that prints to console when ever the PlayerDeathEvent or EntityDeathEvent are called, specifying which of course...
as it turns out, when a player dies it does call both PlayerDeathEvent and EntityDeathEvent
and when a mob dies only EntityDeathEvent is called
yet for some reason TriggerReactor reads it as being called twice when it is hooked to PlayerDeathEvent

commented

I was digging through the code relating to event handling to see If I could find the problem, it looks to me like there needs to be something in place to detect and handle events that are an extension of another event class because they seem to be called at the same time... as to how to pull that off without hard coding a different method for every event that does that... I'm drawing a blank lol.

commented

I've been searching through the documentation, and it might be the bug of bukkit itself.

I just debugged and checked that I'm correctly registering EntityDeathEvent and PlayerDeathEvent, but when the actual event is fired, it's either EntityDeathEvent is called twice or PlayerDeathEvent is called twice.

Can't really solve this problem at this moment.