fix concurrentmodificationexception
This commit is contained in:
parent
8574c0bdeb
commit
4495468c7f
|
@ -147,9 +147,11 @@ public class PerkCreeperExplode extends SmashPerk
|
||||||
|
|
||||||
//Blocks
|
//Blocks
|
||||||
Collection<Block> blocks = UtilBlock.getInRadius(player.getLocation(), 12).keySet();
|
Collection<Block> blocks = UtilBlock.getInRadius(player.getLocation(), 12).keySet();
|
||||||
for(Block bl : blocks)
|
synchronized(blocks)
|
||||||
if(bl.getType() == Material.STATIONARY_LAVA || bl.getType() == Material.LAVA || bl.getType() == Material.BEDROCK) blocks.remove(bl);
|
{
|
||||||
|
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);
|
Manager.GetExplosion().BlockExplosion(blocks, player.getLocation(), false);
|
||||||
|
|
||||||
//Remove Spawns
|
//Remove Spawns
|
||||||
|
|
Loading…
Reference in New Issue