Restructure the onPlayerDamage event