[SPIGOT-3366] No event called when non-living entity is removed Created: 22/Jun/17  Updated: 21/Feb/24  Resolved: 21/Feb/24

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Maxim Roncace Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: EntityDeathEvent, entities

Issue Links:
Relates
relates to SPIGOT-336 EntityDespawnEvent Resolved

 Description   

Currently, no event is called when a non-living entity (such as an `Item`) is removed. I propose that an `EntityDeathEvent` be called from the `Entity#die` method in order to resolve this deficiency.



 Comments   
Comment by mrjasonn [ 21/Feb/24 ]

md_5 This seems to been have addressed in commit but hasn't been closed:  a2736ddb06c7d223d8a415abeb95974881c3a76d

Comment by Maxim Roncace [ 23/Jun/17 ]

Hm, that's a little trickier; there doesn't seem to be a single point where it would make sense to call the event.

My use case is essentially another layer of abstraction on top of Bukkit's model.

Comment by md_5 [ 23/Jun/17 ]

What are you trying to do with the event?
We can't just call an event in #die, because this happens for stuff like chunk unloads also.

Comment by Maxim Roncace [ 22/Jun/17 ]

This only applies to time-based expiration - it doesn't cover items being removed due to burning, hitting cacti, the /kill command, etc.

Comment by Black Hole [ 22/Jun/17 ]

There is an ItemDespawnEvent already.

Generated at Sat Dec 13 15:28:56 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.