mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
add ExploitFix.PreventArmorStandInteraction to prevent combat abilities going off on armor stands
This commit is contained in:
@ -177,6 +177,10 @@ public class ExperienceConfig extends BukkitConfig {
|
||||
return config.getBoolean("ExploitFix.PreventPluginNPCInteraction", true);
|
||||
}
|
||||
|
||||
public boolean isArmorStandInteractionPrevented() {
|
||||
return config.getBoolean("ExploitFix.PreventArmorStandInteraction", true);
|
||||
}
|
||||
|
||||
public boolean isFishingExploitingPrevented() {
|
||||
return config.getBoolean("ExploitFix.Fishing", true);
|
||||
}
|
||||
|
@ -300,6 +300,10 @@ public final class CombatUtils {
|
||||
Entity painSource = event.getDamager();
|
||||
EntityType entityType = painSource.getType();
|
||||
|
||||
if (target instanceof ArmorStand) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (target instanceof Player player) {
|
||||
if(ExperienceConfig.getInstance().isNPCInteractionPrevented()) {
|
||||
if (Misc.isNPCEntityExcludingVillagers(target)) {
|
||||
|
Reference in New Issue
Block a user