[SPIGOT-6112] HangingBreakByEntityEvent gives the wrong entity type when a primed TNT destroys a Hanging entity Created: 27/Aug/20  Updated: 27/Aug/20

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

Type: Bug Priority: Minor
Reporter: Mattijs Leon Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: event

Version: 1.16.2-R0.1-SNAPSHOT
Guidelines Read: Yes

 Description   

I am using a HangingBreakByEntityEvent listener to stop tnt from destroying paintings and item frames. I want to check if the primed TNT was the "remover" but when I use event.getRemover().getType() I get the player entity. This is probably because the player (me) primed the TNT, but for me it would make more sense to return the primed_tnt as entity type.

 

You can recreate this bug by creating an event listener for the HangingBreakByEntityEvent and printing the entity type of the remover with event.getRemover().getType(). If you place an item frame and light TNT next to it, it should show player as entity type.


Generated at Tue Apr 22 04:20:18 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.