mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-29 04:18:07 +01:00
Merge pull request #1707 from Jsinco/master
Check if killer is a projectile shot by a player
This commit is contained in:
commit
757d621e0d
@ -1370,6 +1370,10 @@ public final class JobsPaymentListener implements Listener {
|
||||
|
||||
if (killer instanceof Player) { // Checking if killer is player
|
||||
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
|
||||
UUID uuid = HookManager.getMyPetManager().getOwnerOfPet(killer);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user