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:
1 parent
4c4c8ea1fe
commit
29538c69fe
2 files changed
+72
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user