-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
Java 14
-
CraftBukkit version git-Spigot-b5a13e6-b8ee6a8 (MC: 1.16.2) (Implementing API version 1.16.2-R0.1-SNAPSHOT)
-
Yes
When using the registerEvent method of PluginManager (the one with a custom EventExecutor), the PlayerDeathEvent is also triggered on an EntityDeathEvent.
The following code:
Bukkit.getPluginManager().registerEvent( PlayerDeathEvent.class, new Listener() {}, EventPriority.NORMAL, (listener, event) -> System.out.println("PlayerDeathEventTest >> event type: " + event.getEventName()), Manager.Companion.getINSTANCE() );
...produces the following output (e.g. when killing a player and then burning some zombies):
[19:49:09] [Server thread/INFO]: PlayerDeathEventTest >> event type: PlayerDeathEvent [19:49:09] [Server thread/INFO]: bluefireoly fell out of the world [19:49:09] [Server thread/INFO]: [bluefireoly: Killed bluefireoly] [19:49:42] [Server thread/INFO]: PlayerDeathEventTest >> event type: EntityDeathEvent [19:49:42] [Server thread/INFO]: PlayerDeathEventTest >> event type: EntityDeathEvent [19:49:43] [Server thread/INFO]: PlayerDeathEventTest >> event type: EntityDeathEvent