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

Addition to the Entity.damage()

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • This server is running CraftBukkit version git-Spigot-518206a-a5b9c7b (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)
    • Yes

      Currently spigot can do 2 damage events

      damage(Double) 
      and
      damage(Double, Entity)

      what I'm proposing is to add a feature were you can add a DamageCause to it

      damage(Damage, DamageCause)

      This way if said entity were to die from the damage the DamageCause of that death would be whatever you set the DamageCause to.

      ex.
      Player.damage(20.0, DamageCause)
      and the death message would be
      '%Player% has been squashed by a falling block'
      instead of 
      '%Player% has died.'

            Doc Doc
            Math0424 Math0424
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: