Skip to content

Commit 0138af6

Browse files
committed
Remove getShopsInDatabase method
1 parent f65853a commit 0138af6

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_CleanGhost.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void onCommand(@NotNull CommandSender sender, @NotNull String commandLabe
5959
plugin.getServer().getScheduler().runTaskAsynchronously(plugin, () -> {
6060
MsgUtil.sendDirectMessage(sender, ChatColor.GREEN + "Starting async thread, please wait...");
6161
Util.backupDatabase(); // Already warn the user, don't care about backup result.
62-
for (Shop shop : plugin.getShopLoader().getShopsInDatabase()) {
62+
for (Shop shop : plugin.getShopManager().getAllShops()) {
6363
MsgUtil.sendDirectMessage(sender,
6464
ChatColor.GRAY
6565
+ "Checking the shop "

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -326,32 +326,32 @@ public synchronized void recoverFromFile(@NotNull String fileContent) {
326326
}
327327
}
328328

329-
@NotNull
330-
public List<Shop> getShopsInDatabase() {
331-
errors = 0;
332-
List<Shop> shopsInDatabaseList = new ArrayList<>();
333-
this.plugin.getLogger().info("Loading shops from the database...");
334-
for (ShopRawDatabaseInfo shopRawDatabaseInfo : getOriginShopsInDatabase()) {
335-
try {
336-
ShopDatabaseInfo databaseInfo = new ShopDatabaseInfo(shopRawDatabaseInfo);
337-
Shop shop = new ContainerShop(plugin,
338-
databaseInfo.getLocation(),
339-
databaseInfo.getPrice(),
340-
databaseInfo.getItem(),
341-
databaseInfo.getModerators(),
342-
databaseInfo.isUnlimited(),
343-
databaseInfo.getType(),
344-
databaseInfo.getExtra(),
345-
databaseInfo.getCurrency(),
346-
databaseInfo.isDisableDisplay(),
347-
databaseInfo.getTaxAccount());
348-
shopsInDatabaseList.add(shop);
349-
} catch (Exception e) {
350-
exceptionHandler(e, null);
351-
}
352-
}
353-
return shopsInDatabaseList;
354-
}
329+
// @NotNull
330+
// public List<Shop> getShopsInDatabase() {
331+
// errors = 0;
332+
// List<Shop> shopsInDatabaseList = new ArrayList<>();
333+
// this.plugin.getLogger().info("Loading shops from the database...");
334+
// for (ShopRawDatabaseInfo shopRawDatabaseInfo : getOriginShopsInDatabase()) {
335+
// try {
336+
// ShopDatabaseInfo databaseInfo = new ShopDatabaseInfo(shopRawDatabaseInfo);
337+
// Shop shop = new ContainerShop(plugin,
338+
// databaseInfo.getLocation(),
339+
// databaseInfo.getPrice(),
340+
// databaseInfo.getItem(),
341+
// databaseInfo.getModerators(),
342+
// databaseInfo.isUnlimited(),
343+
// databaseInfo.getType(),
344+
// databaseInfo.getExtra(),
345+
// databaseInfo.getCurrency(),
346+
// databaseInfo.isDisableDisplay(),
347+
// databaseInfo.getTaxAccount());
348+
// shopsInDatabaseList.add(shop);
349+
// } catch (Exception e) {
350+
// exceptionHandler(e, null);
351+
// }
352+
// }
353+
// return shopsInDatabaseList;
354+
// }
355355

356356
@NotNull
357357
public List<ShopRawDatabaseInfo> getOriginShopsInDatabase() {

0 commit comments

Comments
 (0)