Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6112

HangingBreakByEntityEvent gives the wrong entity type when a primed TNT destroys a Hanging entity


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • 1.16.2-R0.1-SNAPSHOT
    • Yes

      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.

            Unassigned Unassigned
            PinkNeonDino Mattijs Leon
            0 Vote for this issue
            1 Start watching this issue