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:
parent
40648f2701
commit
53824f1851
@ -1117,7 +1117,7 @@ public class JobsPaymentListener implements Listener {
|
|||||||
if (!Jobs.getGCManager().canPerformActionInWorld(event.getEntity().getWorld()))
|
if (!Jobs.getGCManager().canPerformActionInWorld(event.getEntity().getWorld()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event.getEntity().getLastDamageCause() != null && !(event.getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent))
|
if (event.getEntity().getLastDamageCause() == null || !(event.getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event.getEntity().getLastDamageCause();
|
EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event.getEntity().getLastDamageCause();
|
||||||
|
Loading…
Reference in New Issue
Block a user