Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into tridentsxbows

This commit is contained in:
nossr50
2020-12-30 15:49:16 -08:00
56 changed files with 2830 additions and 3412 deletions

View File

@@ -383,8 +383,10 @@ public final class CombatUtils {
EntityType entityType = painSource.getType();
if (target instanceof Player) {
if (Misc.isNPCEntityExcludingVillagers(target)) {
return;
if(ExperienceConfig.getInstance().isNPCInteractionPrevented()) {
if (Misc.isNPCEntityExcludingVillagers(target)) {
return;
}
}
Player player = (Player) target;
@@ -755,7 +757,7 @@ public final class CombatUtils {
break;
}
if (Misc.isNPCEntityExcludingVillagers(entity) || !(entity instanceof LivingEntity) || !shouldBeAffected(attacker, entity)) {
if ((ExperienceConfig.getInstance().isNPCInteractionPrevented() && Misc.isNPCEntityExcludingVillagers(entity)) || !(entity instanceof LivingEntity) || !shouldBeAffected(attacker, entity)) {
continue;
}