From 6817ea0287372b8bb8355a4a53c2eed3b5acf66d Mon Sep 17 00:00:00 2001 From: Zrips Date: Sun, 2 Jul 2017 14:04:34 +0300 Subject: [PATCH] Check for player instance on armorstand break --- .../gamingmesh/jobs/listeners/JobsPaymentListener.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index ac06aa25..d58ef7b0 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -1045,9 +1045,11 @@ public class JobsPaymentListener implements Listener { EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event.getEntity().getLastDamageCause(); //extra check for Citizens 2 sentry kills - if (e.getDamager() instanceof Player) - if (e.getDamager().hasMetadata("NPC")) - return; + if (!(e.getDamager() instanceof Player)) + return; + + if (e.getDamager().hasMetadata("NPC")) + return; Player pDamager = (Player) e.getDamager();