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:
parent
0cf52b6362
commit
6be60c1309
@ -971,7 +971,7 @@ public class PlayerManager {
|
|||||||
|
|
||||||
if (ent != null && HookManager.getMyPetManager() != null && HookManager.getMyPetManager().isMyPet(ent, player.getPlayer())) {
|
if (ent != null && HookManager.getMyPetManager() != null && HookManager.getMyPetManager().isMyPet(ent, player.getPlayer())) {
|
||||||
if (petPay == null)
|
if (petPay == null)
|
||||||
petPay = Jobs.getPermissionManager().getMaxPermission(player, "jobs.petpay");
|
petPay = Jobs.getPermissionManager().getMaxPermission(player, "jobs.petpay", false, false, true);
|
||||||
if (petPay != null)
|
if (petPay != null)
|
||||||
boost.add(BoostOf.PetPay, new BoostMultiplier().add(petPay));
|
boost.add(BoostOf.PetPay, new BoostMultiplier().add(petPay));
|
||||||
}
|
}
|
||||||
@ -984,7 +984,7 @@ public class PlayerManager {
|
|||||||
|
|
||||||
if (getall) {
|
if (getall) {
|
||||||
if (petPay == null)
|
if (petPay == null)
|
||||||
petPay = Jobs.getPermissionManager().getMaxPermission(player, "jobs.petpay", force);
|
petPay = Jobs.getPermissionManager().getMaxPermission(player, "jobs.petpay", force, false, true);
|
||||||
if (petPay != null)
|
if (petPay != null)
|
||||||
boost.add(BoostOf.PetPay, new BoostMultiplier().add(petPay));
|
boost.add(BoostOf.PetPay, new BoostMultiplier().add(petPay));
|
||||||
Double amount = Jobs.getPermissionManager().getMaxPermission(player, "jobs.nearspawner", force);
|
Double amount = Jobs.getPermissionManager().getMaxPermission(player, "jobs.nearspawner", force);
|
||||||
|
@ -1241,12 +1241,12 @@ public class JobsPaymentListener implements Listener {
|
|||||||
&& HookManager.getWildStackerHandler().isStackedEntity(lVictim)) {
|
&& HookManager.getWildStackerHandler().isStackedEntity(lVictim)) {
|
||||||
for (com.bgsoftware.wildstacker.api.objects.StackedEntity stacked : HookManager.getWildStackerHandler().getStackedEntities()) {
|
for (com.bgsoftware.wildstacker.api.objects.StackedEntity stacked : HookManager.getWildStackerHandler().getStackedEntities()) {
|
||||||
if (stacked.getType() == lVictim.getType()) {
|
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
|
// Payment for killing player with particular job, except NPC's
|
||||||
if (lVictim instanceof Player && !lVictim.hasMetadata("NPC")) {
|
if (lVictim instanceof Player && !lVictim.hasMetadata("NPC")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user