mirror of
https://github.com/songoda/EpicBosses.git
synced 2025-01-05 06:47:48 +01:00
Fix for NPE
This commit is contained in:
parent
f49aa75db6
commit
22ef485ab0
@ -81,7 +81,7 @@ public class BossDamageListener implements Listener {
|
|||||||
player = (Player) shooter;
|
player = (Player) shooter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player == null) return;
|
if (player == null || activeBossHolder == null) return;
|
||||||
|
|
||||||
double currentDamage = activeBossHolder.getMapOfDamagingUsers().getOrDefault(player.getUniqueId(), 0.0);
|
double currentDamage = activeBossHolder.getMapOfDamagingUsers().getOrDefault(player.getUniqueId(), 0.0);
|
||||||
BossDamageEvent bossDamageEvent = new BossDamageEvent(activeBossHolder, livingEntity, livingEntity.getEyeLocation(), damage);
|
BossDamageEvent bossDamageEvent = new BossDamageEvent(activeBossHolder, livingEntity, livingEntity.getEyeLocation(), damage);
|
||||||
|
Loading…
Reference in New Issue
Block a user