|
@@ -247,7 +247,7 @@ public final class CombatUtils {
|
|
EntityType entityType = damager.getType();
|
|
EntityType entityType = damager.getType();
|
|
|
|
|
|
if (target instanceof Player) {
|
|
if (target instanceof Player) {
|
|
- if (Misc.isNPCEntity(target)) {
|
|
|
|
|
|
+ if (Misc.isNPCEntityExcludingVillagers(target)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -336,7 +336,7 @@ public final class CombatUtils {
|
|
if (tamer != null && tamer instanceof Player && PrimarySkillType.TAMING.shouldProcess(target)) {
|
|
if (tamer != null && tamer instanceof Player && PrimarySkillType.TAMING.shouldProcess(target)) {
|
|
Player master = (Player) tamer;
|
|
Player master = (Player) tamer;
|
|
|
|
|
|
- if (!Misc.isNPCEntity(master) && PrimarySkillType.TAMING.getPermissions(master)) {
|
|
|
|
|
|
+ if (!Misc.isNPCEntityExcludingVillagers(master) && PrimarySkillType.TAMING.getPermissions(master)) {
|
|
processTamingCombat(target, master, wolf, event);
|
|
processTamingCombat(target, master, wolf, event);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -348,11 +348,11 @@ public final class CombatUtils {
|
|
if (projectileSource != null && projectileSource instanceof Player && PrimarySkillType.ARCHERY.shouldProcess(target)) {
|
|
if (projectileSource != null && projectileSource instanceof Player && PrimarySkillType.ARCHERY.shouldProcess(target)) {
|
|
Player player = (Player) projectileSource;
|
|
Player player = (Player) projectileSource;
|
|
|
|
|
|
- if (!Misc.isNPCEntity(player) && PrimarySkillType.ARCHERY.getPermissions(player)) {
|
|
|
|
|
|
+ if (!Misc.isNPCEntityExcludingVillagers(player) && PrimarySkillType.ARCHERY.getPermissions(player)) {
|
|
processArcheryCombat(target, player, event, arrow);
|
|
processArcheryCombat(target, player, event, arrow);
|
|
}
|
|
}
|
|
|
|
|
|
- if (target.getType() != EntityType.CREEPER && !Misc.isNPCEntity(player) && PrimarySkillType.TAMING.getPermissions(player)) {
|
|
|
|
|
|
+ if (target.getType() != EntityType.CREEPER && !Misc.isNPCEntityExcludingVillagers(player) && PrimarySkillType.TAMING.getPermissions(player)) {
|
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
|
TamingManager tamingManager = mcMMOPlayer.getTamingManager();
|
|
TamingManager tamingManager = mcMMOPlayer.getTamingManager();
|
|
tamingManager.attackTarget(target);
|
|
tamingManager.attackTarget(target);
|
|
@@ -522,7 +522,7 @@ public final class CombatUtils {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
- if (Misc.isNPCEntity(entity) || !(entity instanceof LivingEntity) || !shouldBeAffected(attacker, entity)) {
|
|
|
|
|
|
+ if (Misc.isNPCEntityExcludingVillagers(entity) || !(entity instanceof LivingEntity) || !shouldBeAffected(attacker, entity)) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -859,7 +859,7 @@ public final class CombatUtils {
|
|
|
|
|
|
Player player = (Player) attacker;
|
|
Player player = (Player) attacker;
|
|
|
|
|
|
- if (Misc.isNPCEntity(player) || Misc.isNPCEntity(target)) {
|
|
|
|
|
|
+ if (Misc.isNPCEntityExcludingVillagers(player) || Misc.isNPCEntityExcludingVillagers(target)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|