Merge remote-tracking branch 'origin/master'

This commit is contained in:
Ghost_chu committed 2021-07-27 23:42:09 +08:00
commit 2154b4f60a
2 files changed
+5 -6

No files matched your search

@@ -139,9 +139,9 @@ public class ShopLoader {
plugin.getShopManager().removeShop(shop); // Remove from Mem
//TODO: Only remove from memory, so if it actually is a bug, user won't lost all shops.
//TODO: Old shop will be deleted when in same location creating new shop.
continue;
} else {
pendingLoadShops.add(shop);
}
pendingLoadShops.add(shop);
} else {
loadAfterChunkLoaded++;
}
@@ -612,12 +612,11 @@ public class ShopManager {
public @NotNull List<Shop> getShopsInWorld(@NotNull World world) {
final List<Shop> worldShops = new ArrayList<>();
for (final Shop shop : getAllShops()) {
try {
if (Objects.equals(shop.getLocation().getWorld(), world)) {
Location location = shop.getLocation();
if (Util.isWorldLoaded(location)) {
if (Objects.equals(location.getWorld(), world)) {
worldShops.add(shop);
}
} catch (IllegalArgumentException ignored) {
// Rollbar#335
}
}
return worldShops;