From 4dfb07097b8aa3ecd6128d2ce66d7ab61087ef3b Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Tue, 27 Aug 2019 16:18:27 +0800 Subject: [PATCH] Code cleanup Former-commit-id: c4e6ded9adfe5f99c7d109211ab71cc405dc847f [formerly 54ebbc191e436c5418631f4020e8b0f41c6f4527] Former-commit-id: 096b34e7b8b7acafbc8a58abb77c1eeaa1e05a7e --- .../org/maxgamer/quickshop/Shop/ShopManager.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java b/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java index a6fb21e7c..fc787238f 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java @@ -552,11 +552,10 @@ public class ShopManager { return; } Location loc = shop.getLocation(); - ItemStack item = shop.getItem(); try { // Write it to the database plugin.getDatabaseHelper().createShop(ShopModerator.serialize(shop.getModerator()), shop - .getPrice(), item, (shop.isUnlimited() ? + .getPrice(), shop.getItem(), (shop.isUnlimited() ? 1 : 0), shop.getShopType().toID(), Objects.requireNonNull(loc.getWorld()).getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); // Add it to the world @@ -574,9 +573,9 @@ public class ShopManager { } catch (SQLException error2) { //Failed removing plugin.getLogger().warning("Failed to autofix the database, all changes will revert after a reboot."); - error.printStackTrace(); error2.printStackTrace(); } + error.printStackTrace(); } //Create sign if (info.getSignBlock() != null && plugin.getConfig().getBoolean("shop.auto-sign")) { @@ -732,13 +731,6 @@ public class ShopManager { p.sendMessage(MsgUtil.getMessage("shop-creation-cancelled")); return; } - /* Creation handling */ - // if (info.getAction() == ShopAction.CREATE) { - // actionCreate(p, actions, info, message); - // /* Purchase Handling */ - // } else if (info.getAction() == ShopAction.BUY) { - // actionTrade(p, actions, info, message); - // } switch (info.getAction()) { case CREATE: actionCreate(p, actions, info, message, bypassProtectionChecks);