Hi,
First of all let me say that i'm trying to make a mod that under certain circumstances disables the pvp between two players and I've considered many options on how to do that. Two main that came to my mind are reducing damage taken to 0 via the OnEntityReceiveDamage event or completly stopping the attack somehow. So far DidAttack does the right thing where server doesn't even acknowledge the hit, nor does the receiving end of the hit. The issue with it is that while the check passes correctly, no matter what I do, entities with the behavior (players) aren't receiving damage.
I would be glad if someone explained to me how DidAttack actually works or pointed me to some source. (I've checked the https://github.com/anegostudios but they don't use DidAttack anywhere nor is it commented in the api)
Thanks in advance!