As @siemaeniu500 suggested.

Makes PVP toggle only cancel the event, if the getDamager() has a
carpet and isVisible(). Therefore whoever has a carpet can still take
damage just not dish it out. (Makes sense)