mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-31 20:41:28 +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
|
||||
&& (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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user