Skip to content

Commit

Permalink
Added removal of Chest Linkage entries for removed shops
Browse files Browse the repository at this point in the history
  • Loading branch information
KillerOfPie committed Aug 25, 2021
1 parent 29ab32a commit 4bbd96b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ public void onRegionRestore(RestoreRegionEvent event) {
World world = region.getRegionworld();

for (Vector point : region.getRegion().getPoints()) {
Shop shop = dataStorage.loadShopFromSign(new ShopLocation(world, point.getBlockX(), point.getBlockY(), point.getBlockZ()));
ShopLocation sl = new ShopLocation(world, point.getBlockX(), point.getBlockY(), point.getBlockZ());
Shop shop = dataStorage.loadShopFromSign(sl);
if (shop != null)
shop.remove();
dataStorage.removeChestLinkage(sl);
}
}
}
Expand Down

0 comments on commit 4bbd96b

Please sign in to comment.