Code cleanup

Former-commit-id: c4e6ded9adfe5f99c7d109211ab71cc405dc847f [formerly 54ebbc191e436c5418631f4020e8b0f41c6f4527]
Former-commit-id: 096b34e7b8b7acafbc8a58abb77c1eeaa1e05a7e
This commit is contained in:
Ghost_chu committed 2019-08-27 16:18:27 +08:00
1 parent 13e6cb4aa1
commit 4dfb07097b
1 file changed
+2 -10
@@ -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);