Siege: TNT destroys soft blocks.

During a siege, TNT may destroy soft blocks regardless of surface
explosion rules.
This commit is contained in:
ryanhamshire 2015-08-28 18:01:17 -07:00
parent d6743f9040
commit e688627304

View File

@ -268,6 +268,25 @@ public class EntityEventHandler implements Listener
continue;
}
//if claim is under siege, allow soft blocks to be destroyed
if(claim != null && claim.siegeData != null)
{
Material material = block.getType();
boolean breakable = false;
for(int j = 0; j < GriefPrevention.instance.config_siege_blocks.size(); j++)
{
Material breakableMaterial = GriefPrevention.instance.config_siege_blocks.get(j);
if(breakableMaterial == material)
{
breakable = true;
explodedBlocks.add(block);
break;
}
}
if(breakable) continue;
}
//if no, then also consider surface rules
if(claim == null)
{