fix concurrentmodificationexception

This commit is contained in:
fooify 2015-07-01 15:50:07 -07:00
parent 8574c0bdeb
commit 4495468c7f
1 changed files with 5 additions and 3 deletions

View File

@ -147,9 +147,11 @@ public class PerkCreeperExplode extends SmashPerk
//Blocks
Collection<Block> blocks = UtilBlock.getInRadius(player.getLocation(), 12).keySet();
for(Block bl : blocks)
if(bl.getType() == Material.STATIONARY_LAVA || bl.getType() == Material.LAVA || bl.getType() == Material.BEDROCK) blocks.remove(bl);
synchronized(blocks)
{
for(Block bl : blocks)
if(bl.getType() == Material.STATIONARY_LAVA || bl.getType() == Material.LAVA || bl.getType() == Material.BEDROCK) blocks.remove(bl);
}
Manager.GetExplosion().BlockExplosion(blocks, player.getLocation(), false);
//Remove Spawns