mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 12:05:16 +01:00
feat: Add gain exp by returning a fireball from a ghast
This commit is contained in:
parent
b537ec4f36
commit
834d807b22
@ -1306,6 +1306,8 @@ public final class JobsPaymentListener implements Listener {
|
||||
|
||||
if (!(event.getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent)) {
|
||||
killer = entityLastDamager.getIfPresent(event.getEntity().getUniqueId());
|
||||
} else if(event.getEntity().getLastDamageCause().getCause() == EntityDamageEvent.DamageCause.PROJECTILE) {
|
||||
killer = event.getEntity().getLastDamageCause().getDamageSource().getCausingEntity();
|
||||
} else {
|
||||
killer = ((EntityDamageByEntityEvent) event.getEntity().getLastDamageCause()).getDamager();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user