[SPIGOT-6161] Missing event.getCause() (DamageCause) in all Vehicle Events Created: 29/Sep/20  Updated: 07/Oct/20

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

Type: New Feature Priority: Minor
Reporter: Steve Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: entity, event

Version: CraftBukkit version git-Spigot-17d78db-2577f9b (MC: 1.16.3) (Implementing API version 1.16.3-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

The Vehicle Event API seems to be missing all DamageCause methods.

If a Vehicle is destroyed in an explosion there is no way to detect that it was an explosion that destroyed it. You can get the Attacker and you can get the Vehicle but you can't access any method to tell what caused the damage or death. If you obtain the Vehicle you can use getLastDamageCause() but the EntityDamageEvent will always return null due to the event never firing for Vehicles.

EntityDamageByEntityEvent fires once the Vehicle has been destroyed for the DROPPED_ITEM but never on the vehicle itself.


Generated at Tue Apr 08 01:20:58 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.