Parkour

Parkour

570k Downloads

Players take one tick of damage on falling in the void with full health

URoulon opened this issue ยท 3 comments

commented

We're running 6.7.1 with DisablePlayerDamage and DisableFallDamage both set to true.

The player takes one tick of void damage (two hearts) whenever it falls in it with full health.

  • Happens the first time to fall completely (since the player joins fully healed)
  • Doesn't happen the following times (since the player is no longer fully healed)
  • Tried rehealing myself and then falling, retriggering the bug
commented

Fixed in 7.0, see #307

commented

Not sure if this is a bug or not. So
DisablePlayerDamage: true is only effective with void damage if you also have

OnCourse:
    DieInVoid: false

If DieInVoid is true then it takes precedence over DisablePlayerDamage, and the player will take void damage as you describe before being teleported back to the last checkpoint.

commented

I tried on an old backup running Parkour 5.1 and got the same behaviour.
Seems like I didn't remember the game inflicting you the damage, but couldn't changing that

        if (event.getCause() == EntityDamageEvent.DamageCause.VOID) {
            if (playing && parkour.getConfig().getBoolean("OnCourse.DieInVoid")) {
                if (parkour.getConfig().getBoolean("OnCourse.DisablePlayerDamage")) {
                    event.setCancelled(true);
                }
                parkour.getPlayerManager().playerDie(player);
                return;

in PlayerListener block the damage while still letting the "void death" happen?

(edited to include a DisablePlayerDamage check)