mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-13 22:21:06 +00:00
Fix money transfers on sales
This commit is contained in:
parent
18457357ba
commit
01886ca88a
@ -399,8 +399,8 @@ public class InteractShop implements Listener {
|
|||||||
|
|
||||||
if (freeAmount >= product.getAmount()) {
|
if (freeAmount >= product.getAmount()) {
|
||||||
|
|
||||||
EconomyResponse r = econ.withdrawPlayer(executor, shop.getBuyPrice());
|
EconomyResponse r = econ.depositPlayer(executor, shop.getSellPrice());
|
||||||
EconomyResponse r2 = (shop.getShopType() != ShopType.ADMIN) ? econ.depositPlayer(shop.getVendor(), shop.getBuyPrice()) : null;
|
EconomyResponse r2 = (shop.getShopType() != ShopType.ADMIN) ? econ.withdrawPlayer(shop.getVendor(), shop.getSellPrice()) : null;
|
||||||
|
|
||||||
if (r.transactionSuccess()) {
|
if (r.transactionSuccess()) {
|
||||||
if (r2 != null) {
|
if (r2 != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user