Player.getNoDamageTicks() never returns 0 in EntityDamageEvent when consistent damage is taken

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • CraftBukkit version 4591-Spigot-da5d877-3cc909f (MC: 1.21.11 Unobfuscated) (Implementing API version 1.21.11-R0.2-SNAPSHOT)
    • Yes

      I'd expect Player.getNoDamageTicks() to return 0 in EntityDamageEvent when consistent damage is taken. Either the value is incorrect or the event isn't always being fired. The player seems to take damage again when the value is at 10.

      I ran into this when dealing with lava damage. It emits the event for every tick the player is in lava, which was causing problems in my plugin.

      I've captured footage of the problem including logging:
      https://www.dropbox.com/scl/fi/axrobb4iku35isq92gvfj/Screen-Recording-2026-02-02-211834.mp4?rlkey=znoiap479gd3csmxvx65znsp6&e=1&st=avm1y75i&dl=0

      I've also attached the plugin I recorded the above video with.

            Assignee:
            Unassigned
            Reporter:
            Rowan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: