Fix money transfers on sales

This commit is contained in:
Eric 2016-06-08 16:17:33 +02:00
parent 18457357ba
commit 01886ca88a

View File

@ -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) {