mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-16 20:31:25 +01:00
Merge pull request #1803 from mikyvars/master
Add gain exp by returning a fireball from a ghast
This commit is contained in:
commit
adb92ff2a9
@ -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