Resolved an issue where explosions of type OTHER_EXPLOSION were ignoring the world config settings

This commit is contained in:
Dark Arc 2013-12-11 00:53:49 -05:00
parent 2d90fddbee
commit 96a69aa2ef

View File

@ -191,7 +191,8 @@ private void onEntityDamageByBlock(EntityDamageByBlockEvent event) {
if (type == DamageCause.BLOCK_EXPLOSION
&& (wcfg.disableExplosionDamage || wcfg.blockOtherExplosions
|| !plugin.getGlobalRegionManager().allows(DefaultFlag.OTHER_EXPLOSION, player.getLocation()))) {
|| (wcfg.explosionFlagCancellation
&& !plugin.getGlobalRegionManager().allows(DefaultFlag.OTHER_EXPLOSION, player.getLocation())))) {
event.setCancelled(true);
return;
}
@ -201,7 +202,8 @@ private void onEntityDamageByBlock(EntityDamageByBlockEvent event) {
// handled anywhere else
if (type == DamageCause.BLOCK_EXPLOSION
&& (wcfg.blockOtherExplosions
|| !plugin.getGlobalRegionManager().allows(DefaultFlag.OTHER_EXPLOSION, defender.getLocation()))) {
|| (wcfg.explosionFlagCancellation
&& !plugin.getGlobalRegionManager().allows(DefaultFlag.OTHER_EXPLOSION, defender.getLocation())))) {
event.setCancelled(true);
return;
}