Siege: TNT destroys soft blocks.
During a siege, TNT may destroy soft blocks regardless of surface explosion rules.
This commit is contained in:
parent
d6743f9040
commit
e688627304
|
|
@ -268,6 +268,25 @@ public class EntityEventHandler implements Listener
|
||||||
continue;
|
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 no, then also consider surface rules
|
||||||
if(claim == null)
|
if(claim == null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user