Don't remove shops when not iterating over copy
This commit is contained in:
parent
d53ee08db9
commit
9c7170e109
|
@ -52,7 +52,7 @@ public class AreaShopListener implements Listener {
|
||||||
private void removeShopsInRegion(GeneralRegion generalRegion) {
|
private void removeShopsInRegion(GeneralRegion generalRegion) {
|
||||||
if (!plugin.hasWorldGuard()) return;
|
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;
|
if (!shop.getLocation().getWorld().getName().equals(generalRegion.getWorldName())) continue;
|
||||||
|
|
||||||
for (IWrappedRegion r : WorldGuardWrapper.getInstance().getRegions(shop.getLocation())) {
|
for (IWrappedRegion r : WorldGuardWrapper.getInstance().getRegions(shop.getLocation())) {
|
||||||
|
|
Loading…
Reference in New Issue