Optimize AdvancedShopRegionMarketIntegration

This commit is contained in:
sandtechnology committed 2021-08-11 03:24:16 +08:00
1 parent 6bc95ec9ba
commit bdfd79f53c
1 file changed
+3 -2
@@ -154,9 +154,10 @@ public class AdvancedShopRegionMarketIntegration extends QSIntegratedPlugin impl
shopMap.putAll(shopsInChunk);
}
}
for (Location shopLocation : shopMap.keySet()) {
for (Map.Entry<Location, Shop> shopEntry : shopMap.entrySet()) {
Location shopLocation = shopEntry.getKey();
if (region.getRegion().contains(shopLocation.getBlockX(), shopLocation.getBlockY(), shopLocation.getBlockZ())) {
Shop shop = shopMap.get(shopLocation);
Shop shop = shopEntry.getValue();
if (shop != null) {
shop.onUnload();
shop.delete(false);