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

feat: Add gain exp by returning a fireball from a ghast

This commit is contained in:
mikyvars 2024-08-14 19:53:45 +02:00
parent b537ec4f36
commit 834d807b22

View File

@ -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();
}