Ignore snowballs, etc. from triggering PvP timer

If _really_ desired, I could add an option for this. But more often than
not, unintended deaths could occur from players disconnecting from a
snowball fight.
This commit is contained in:
RoboMWM
2016-09-16 00:12:03 -07:00
parent 4c4c8ea1fe
commit 29538c69fe
2 changed files with 72 additions and 0 deletions
@@ -1043,6 +1043,9 @@ public class EntityEventHandler implements Listener
//only interested in entities damaging entities (ignoring environmental damage)
if(!(event instanceof EntityDamageByEntityEvent)) return;
//Ignore "damage" from snowballs, eggs, etc. from triggering the PvP timer
if (event.getDamage() == 0) return;
EntityDamageByEntityEvent subEvent = (EntityDamageByEntityEvent) event;