mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-30 21:07:48 +01:00
Check if killer is a projectile shot by a player
This commit is contained in:
parent
16a59470fc
commit
adf2fbb640
@ -1370,6 +1370,10 @@ public final class JobsPaymentListener implements Listener {
|
|||||||
|
|
||||||
if (killer instanceof Player) { // Checking if killer is player
|
if (killer instanceof Player) { // Checking if killer is player
|
||||||
pDamager = (Player) killer;
|
pDamager = (Player) killer;
|
||||||
|
} else if (killer instanceof Projectile) { // Checking if killer is a projectile shot by a player
|
||||||
|
Projectile projectile = (Projectile) killer;
|
||||||
|
|
||||||
|
pDamager = projectile.getShooter() instanceof Player ? (Player) projectile.getShooter() : null;
|
||||||
} else if (isMyPet) { // Checking if killer is MyPet animal
|
} else if (isMyPet) { // Checking if killer is MyPet animal
|
||||||
UUID uuid = HookManager.getMyPetManager().getOwnerOfPet(killer);
|
UUID uuid = HookManager.getMyPetManager().getOwnerOfPet(killer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user