Skip to content

Commit 91cdb9b

Browse files
committed
Try keep loading but still send errors
1 parent bc06fa9 commit 91cdb9b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<artifactId>QuickShop</artifactId>
2626

2727
<properties>
28-
<pluginver>5.0.0.11</pluginver>
28+
<pluginver>5.0.0.12</pluginver>
2929
<package>org.maxgamer.quickshop</package>
3030
<developer>Ghost-chu</developer>
3131
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/org/maxgamer/quickshop/shop/ShopLoader.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,13 @@ public void loadShops(@Nullable String worldName) {
170170
}
171171
Bukkit.getScheduler().runTaskLater(plugin, () -> {
172172
for (Shop shop : pendingLoading) {
173-
shop.onLoad();
173+
try {
174+
shop.onLoad();
175+
} catch (IllegalStateException exception) {
176+
plugin.getShopManager().loadShop(shop.getLocation().getWorld().getName(), shop);
177+
plugin.getSentryErrorReporter().sendError(exception);
178+
shop.onLoad();
179+
}
174180
shop.update();
175181
}
176182
}, 1);

0 commit comments

Comments
 (0)