mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-07 16:01:32 +01:00
Resolved an issue where explosions of type OTHER_EXPLOSION were ignoring the world config settings
This commit is contained in:
parent
2d90fddbee
commit
96a69aa2ef
@ -191,7 +191,8 @@ private void onEntityDamageByBlock(EntityDamageByBlockEvent event) {
|
|||||||
|
|
||||||
if (type == DamageCause.BLOCK_EXPLOSION
|
if (type == DamageCause.BLOCK_EXPLOSION
|
||||||
&& (wcfg.disableExplosionDamage || wcfg.blockOtherExplosions
|
&& (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);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -201,7 +202,8 @@ private void onEntityDamageByBlock(EntityDamageByBlockEvent event) {
|
|||||||
// handled anywhere else
|
// handled anywhere else
|
||||||
if (type == DamageCause.BLOCK_EXPLOSION
|
if (type == DamageCause.BLOCK_EXPLOSION
|
||||||
&& (wcfg.blockOtherExplosions
|
&& (wcfg.blockOtherExplosions
|
||||||
|| !plugin.getGlobalRegionManager().allows(DefaultFlag.OTHER_EXPLOSION, defender.getLocation()))) {
|
|| (wcfg.explosionFlagCancellation
|
||||||
|
&& !plugin.getGlobalRegionManager().allows(DefaultFlag.OTHER_EXPLOSION, defender.getLocation())))) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user