Fixed bugs with explosion protection options.

All permutations now work as intended.
This commit is contained in:
ryanhamshire 2015-04-21 21:25:04 -07:00
parent c74eff07d7
commit af9fb6d56f

View File

@ -258,16 +258,16 @@ class EntityEventHandler implements Listener
} }
//if yes, apply claim exemptions if they should apply //if yes, apply claim exemptions if they should apply
if((claim != null && claim.areExplosivesAllowed) || !GriefPrevention.instance.config_blockClaimExplosions) if(claim != null && (claim.areExplosivesAllowed || !GriefPrevention.instance.config_blockClaimExplosions))
{ {
explodedBlocks.add(block); explodedBlocks.add(block);
continue; continue;
} }
//if no, then also consider surface rules //if no, then also consider surface rules
if(applySurfaceRules && claim == null) if(claim == null)
{ {
if(block.getLocation().getBlockY() < GriefPrevention.instance.getSeaLevel(world) - 7) if(!applySurfaceRules || block.getLocation().getBlockY() < GriefPrevention.instance.getSeaLevel(world) - 7)
{ {
explodedBlocks.add(block); explodedBlocks.add(block);
} }