1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-26 04:25:15 +01:00

Check for player instance on armorstand break

This commit is contained in:
Zrips 2017-07-02 14:04:34 +03:00
parent a88e733851
commit 6817ea0287

View File

@ -1045,9 +1045,11 @@ public class JobsPaymentListener implements Listener {
EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event.getEntity().getLastDamageCause(); EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event.getEntity().getLastDamageCause();
//extra check for Citizens 2 sentry kills //extra check for Citizens 2 sentry kills
if (e.getDamager() instanceof Player) if (!(e.getDamager() instanceof Player))
if (e.getDamager().hasMetadata("NPC")) return;
return;
if (e.getDamager().hasMetadata("NPC"))
return;
Player pDamager = (Player) e.getDamager(); Player pDamager = (Player) e.getDamager();