From 4495468c7f905539979a18f852210686ba873dcd Mon Sep 17 00:00:00 2001 From: fooify Date: Wed, 1 Jul 2015 15:50:07 -0700 Subject: [PATCH] fix concurrentmodificationexception --- .../game/arcade/kit/perks/PerkCreeperExplode.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperExplode.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperExplode.java index 0fe298495..6498ec8d8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperExplode.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkCreeperExplode.java @@ -147,9 +147,11 @@ public class PerkCreeperExplode extends SmashPerk //Blocks Collection 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