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

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

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • CraftBukkit version git-Spigot-17d78db-2577f9b (MC: 1.16.3) (Implementing API version 1.16.3-R0.1-SNAPSHOT)
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ElgarL Steve
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: