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

Entity for Tameable should return the entity not the player

Player is not Tameable, lol
This commit is contained in:
montlikadani 2020-10-03 11:46:36 +02:00
parent 0cf52b6362
commit 6be60c1309
2 changed files with 4 additions and 4 deletions

View File

@ -971,7 +971,7 @@ public class PlayerManager {
if (ent != null && HookManager.getMyPetManager() != null && HookManager.getMyPetManager().isMyPet(ent, player.getPlayer())) {
if (petPay == null)
petPay = Jobs.getPermissionManager().getMaxPermission(player, "jobs.petpay");
petPay = Jobs.getPermissionManager().getMaxPermission(player, "jobs.petpay", false, false, true);
if (petPay != null)
boost.add(BoostOf.PetPay, new BoostMultiplier().add(petPay));
}
@ -984,7 +984,7 @@ public class PlayerManager {
if (getall) {
if (petPay == null)
petPay = Jobs.getPermissionManager().getMaxPermission(player, "jobs.petpay", force);
petPay = Jobs.getPermissionManager().getMaxPermission(player, "jobs.petpay", force, false, true);
if (petPay != null)
boost.add(BoostOf.PetPay, new BoostMultiplier().add(petPay));
Double amount = Jobs.getPermissionManager().getMaxPermission(player, "jobs.nearspawner", force);

View File

@ -1241,12 +1241,12 @@ public class JobsPaymentListener implements Listener {
&& HookManager.getWildStackerHandler().isStackedEntity(lVictim)) {
for (com.bgsoftware.wildstacker.api.objects.StackedEntity stacked : HookManager.getWildStackerHandler().getStackedEntities()) {
if (stacked.getType() == lVictim.getType()) {
Jobs.action(jDamager, new EntityActionInfo(stacked.getLivingEntity(), ActionType.KILL), pDamager, stacked.getLivingEntity());
Jobs.action(jDamager, new EntityActionInfo(stacked.getLivingEntity(), ActionType.KILL), e.getDamager(), stacked.getLivingEntity());
}
}
}
Jobs.action(jDamager, new EntityActionInfo(lVictim, ActionType.KILL), pDamager, lVictim);
Jobs.action(jDamager, new EntityActionInfo(lVictim, ActionType.KILL), e.getDamager(), lVictim);
// Payment for killing player with particular job, except NPC's
if (lVictim instanceof Player && !lVictim.hasMetadata("NPC")) {