mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-09 17:02:20 +01:00
Fixes WORLDGUARD-2205
Mob Damage from projectiles is now properly blocked in regions where applicable.
This commit is contained in:
parent
eec78092b5
commit
f098905a92
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user