1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 22:13:25 +01:00

Fix NPE on death event

This commit is contained in:
montlikadani 2020-03-26 12:08:25 +01:00
parent 40648f2701
commit 53824f1851

View File

@ -1117,7 +1117,7 @@ public class JobsPaymentListener implements Listener {
if (!Jobs.getGCManager().canPerformActionInWorld(event.getEntity().getWorld()))
return;
if (event.getEntity().getLastDamageCause() != null && !(event.getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent))
if (event.getEntity().getLastDamageCause() == null || !(event.getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent))
return;
EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event.getEntity().getLastDamageCause();