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

Call ItemDespawnEvent for Items that fell out of the world

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • It's important?
    • Yes

      Currently there's no way to get Item entities that were killed due to falling out of the world (Y < -128). In my case I'm need to teleport any entity from that location to the world's spawn, and listening to EntityDamageEvent with DamageCause.VOID currently works fine for any entity except for Items — they are just gets despawned silently w/o any event.

      So I suggest to implement a Cause enum (NATURAL/DEFAULT and OUT_OF_WORLD) for ItemDespawnEvent (this will be better I think) or call EntityDamageEvent for Item entities too (this will probably be easier).

      Thanks!

            Unassigned Unassigned
            molor Zhenya Zima
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: