Jump to content

EntityBehavior, DidAttack method question


Recommended Posts

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!

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.