-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
None
If one explodes a bed in the Nether or End, I would've expected the sequence of events to go:
BlockExplodeEvent (getBlock().getType() == Material.BED_BLOCK or Material.BED, cancellable)
EntityDamageEvent (getCause() == DamageCause.BLOCK_EXPLOSION)
PlayerDeathEvent (assuming the player died from the damage)
However, the events seem to instead go:
EntityDamageEvent (getCause() == DamageCause.BLOCK_EXPLOSION)
PlayerDeathEvent (assuming the player died from the damage)
BlockExplodeEvent (getBlock().getType() == Material.AIR, cancellable but no effect)
This makes it impossible to track damage or deaths caused by bed explosions.
Steps to reproduce:
- Create a plugin that listens for EntityDamageEvent and BlockExplodeEvent events.
- Make the plugin print the damage cause under EntityDamageEvent (getCause()) and the block type under BlockExplodeEvent (getBlock().getType())
- Enter the Nether or the End, go into survival/adventure mode, place a bed down and try to use it.
- Observe the cause as BLOCK_EXPLOSION and the block type as AIR.
- duplicates
-
SPIGOT-3026 Item Frames Breaking on Cancelled EntityExplodeEvent
- Resolved