From 01886ca88ae684f6f26fd48ad92d244ad0d2dbbe Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 8 Jun 2016 16:17:33 +0200 Subject: [PATCH] Fix money transfers on sales --- src/de/epiceric/shopchest/event/InteractShop.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/epiceric/shopchest/event/InteractShop.java b/src/de/epiceric/shopchest/event/InteractShop.java index 26762c7..09fe27d 100644 --- a/src/de/epiceric/shopchest/event/InteractShop.java +++ b/src/de/epiceric/shopchest/event/InteractShop.java @@ -399,8 +399,8 @@ public class InteractShop implements Listener { if (freeAmount >= product.getAmount()) { - EconomyResponse r = econ.withdrawPlayer(executor, shop.getBuyPrice()); - EconomyResponse r2 = (shop.getShopType() != ShopType.ADMIN) ? econ.depositPlayer(shop.getVendor(), shop.getBuyPrice()) : null; + EconomyResponse r = econ.depositPlayer(executor, shop.getSellPrice()); + EconomyResponse r2 = (shop.getShopType() != ShopType.ADMIN) ? econ.withdrawPlayer(shop.getVendor(), shop.getSellPrice()) : null; if (r.transactionSuccess()) { if (r2 != null) {