From 9c7170e1097d2d09f49b3adff0cfe502ebc3bc44 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 7 Aug 2019 13:34:26 +0200 Subject: [PATCH] Don't remove shops when not iterating over copy --- .../java/de/epiceric/shopchest/listeners/AreaShopListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/epiceric/shopchest/listeners/AreaShopListener.java b/src/main/java/de/epiceric/shopchest/listeners/AreaShopListener.java index 8012223..b850e47 100644 --- a/src/main/java/de/epiceric/shopchest/listeners/AreaShopListener.java +++ b/src/main/java/de/epiceric/shopchest/listeners/AreaShopListener.java @@ -52,7 +52,7 @@ public class AreaShopListener implements Listener { private void removeShopsInRegion(GeneralRegion generalRegion) { if (!plugin.hasWorldGuard()) return; - for (Shop shop : plugin.getShopUtils().getShops()) { + for (Shop shop : plugin.getShopUtils().getShopsCopy()) { if (!shop.getLocation().getWorld().getName().equals(generalRegion.getWorldName())) continue; for (IWrappedRegion r : WorldGuardWrapper.getInstance().getRegions(shop.getLocation())) {