Closed jupiter1390 closed 4 years ago
I will implement GameEntityAttackEvent for you. Dispatching the event to your script should be easier and straightforward to achieve your idea. You keep the amount of total damage by defining a variable, and monitor the event to record it. That's pretty much it. If you need to know who/what dealt damage, investigate event.getAttacker(). It can be any Entity: an arrow, player, etc. You can check what item the attacker was holding to determine whether it was melee attack or not. Let's move to #82 and discuss further, shall we?
module to keep track on targeted entities' damage output(melee, projectile if possible) Could be used for custom score or game mechanic based on how much damage player has dealt, or other conditions