Don't remove shops when not iterating over copy

This commit is contained in:
Eric 2019-08-07 13:34:26 +02:00
parent d53ee08db9
commit 9c7170e109
1 changed files with 1 additions and 1 deletions

View File

@ -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())) {