Fixes WORLDGUARD-2205

Mob Damage from projectiles is now properly blocked in regions where applicable.
This commit is contained in:
Dark Arc 2012-11-02 21:07:38 -04:00
parent eec78092b5
commit f098905a92

View File

@ -269,8 +269,7 @@ private void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
}
}
if (attacker != null && attacker instanceof LivingEntity
&& !(attacker instanceof Player)) {
if (attacker != null && attacker instanceof LivingEntity && !(attacker instanceof Player)) {
if (attacker instanceof Creeper && wcfg.blockCreeperExplosions) {
event.setCancelled(true);
return;
@ -321,7 +320,7 @@ private void onEntityDamageByProjectile(EntityDamageByEntityEvent event) {
}
// Check Mob
if (attacker != null && attacker instanceof Skeleton) {
if (attacker != null && attacker instanceof LivingEntity && !(attacker instanceof Player)) {
if (wcfg.disableMobDamage) {
event.setCancelled(true);
return;