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

EntityDamageEvent not working for item entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • git-Spigot-9b45d9f-6b061e2

      Problem:
      EntityDamageEvent and EntityDamageByBlockEvent don't trigger when item entities / dropped items get damaged, for example by cactus.

      It seems there is just a craftbukkit event handler for that in the LivingEntity class, but EntityItem doesn't trigger that event (or any own event to handle this)

      Reproduce:
      Watch events and drop some stuff on cactus.

      Possible Solution:
      Call CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f) in net.minecraft.server.EntityItem.damageEntity method, as already used in some other non-living entity classes (ArmorStand or ItemFrame).

            md_5 md_5
            möhre möhre
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: