mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 18:47:44 +01:00
Fixed the Skeleton damage bug in protected regions
This commit is contained in:
parent
10c47eff7e
commit
e84afb4808
@ -152,6 +152,17 @@ public void onEntityDamageByProjectile(EntityDamageByProjectileEvent event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (attacker != null && attacker instanceof Skeleton) {
|
||||||
|
if (plugin.useRegions) {
|
||||||
|
Vector pt = toVector(defender.getLocation());
|
||||||
|
|
||||||
|
if (!plugin.regionManager.getApplicableRegions(pt)
|
||||||
|
.allowsFlag(AreaFlags.FLAG_MOB_DAMAGE)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user