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

Missing event.getCause() (DamageCause) in all Vehicle Events


    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • CraftBukkit version git-Spigot-17d78db-2577f9b (MC: 1.16.3) (Implementing API version 1.16.3-R0.1-SNAPSHOT)
    • Yes

      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.

            Unassigned Unassigned
            ElgarL Steve
            0 Vote for this issue
            2 Start watching this issue