From 816b08b14a22507f89effbc904a618772dfc0ccb Mon Sep 17 00:00:00 2001 From: GJ Date: Mon, 16 Sep 2013 08:53:55 -0400 Subject: [PATCH] Make sure the attacker is a valid player too. Fixes #1464 --- src/main/java/com/gmail/nossr50/listeners/EntityListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index 04199bcb7..737790cf8 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -151,6 +151,10 @@ public class EntityListener implements Listener { Entity attacker = event.getDamager(); + if (Misc.isNPCEntity(attacker)) { + return; + } + if (attacker instanceof Projectile) { attacker = ((Projectile) attacker).getShooter(); }