[Solved] Is EntityDeathEvent fired when PlayerDeathEvent is fired?

AuroraLS3

Member
Hi.

On Bukkit EntityDeathEvent fires when PlayerDeathEvent is fired, allowing to use this event for player deaths as well by checking if
Code:
Entity dead = event.getEntity();

        if (dead instanceof Player) {
However I got a report that says that player kills are not recorded (I'm using the listener in a way that uses the if above)

Could somebody help me out? (The javadocs are practically useless)
 

PetteriM1

Resource Mod
Staff member
Hi.

On Bukkit EntityDeathEvent fires when PlayerDeathEvent is fired, allowing to use this event for player deaths as well by checking if
Code:
Entity dead = event.getEntity();

        if (dead instanceof Player) {
However I got a report that says that player kills are not recorded (I'm using the listener in a way that uses the if above)

Could somebody help me out? (The javadocs are practically useless)
Only PlayerDeathEvent is called when a player dies. You can use event.getEntity() from PlayerDeathEvent to get the Player.
 
Top