From 51e16febe72006a3517a91fe77b219a3b1b30093 Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 4 Nov 2018 14:21:14 +0100 Subject: [PATCH] Deposit refund instead of withdrawing it --- .../de/epiceric/shopchest/listeners/ChestProtectListener.java | 2 +- .../de/epiceric/shopchest/listeners/ShopInteractListener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/epiceric/shopchest/listeners/ChestProtectListener.java b/src/main/java/de/epiceric/shopchest/listeners/ChestProtectListener.java index c35e671..817ce02 100644 --- a/src/main/java/de/epiceric/shopchest/listeners/ChestProtectListener.java +++ b/src/main/java/de/epiceric/shopchest/listeners/ChestProtectListener.java @@ -78,7 +78,7 @@ public class ChestProtectListener implements Listener { } else { if (p.getUniqueId().equals(shop.getVendor().getUniqueId())) { double creationPrice = shop.getShopType() == ShopType.ADMIN ? Config.shopCreationPriceAdmin : Config.shopCreationPriceNormal; - EconomyResponse r = plugin.getEconomy().withdrawPlayer(p, shop.getLocation().getWorld().getName(), creationPrice); + EconomyResponse r = plugin.getEconomy().depositPlayer(p, shop.getLocation().getWorld().getName(), creationPrice); if (!r.transactionSuccess()) { plugin.debug("Economy transaction failed: " + r.errorMessage); p.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED, diff --git a/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java b/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java index d137740..1077318 100644 --- a/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java +++ b/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java @@ -775,7 +775,7 @@ public class ShopInteractListener implements Listener { if (executor.getUniqueId().equals(shop.getVendor().getUniqueId())) { double creationPrice = shop.getShopType() == ShopType.ADMIN ? Config.shopCreationPriceAdmin : Config.shopCreationPriceNormal; - EconomyResponse r = plugin.getEconomy().withdrawPlayer(executor, shop.getLocation().getWorld().getName(), creationPrice); + EconomyResponse r = plugin.getEconomy().depositPlayer(executor, shop.getLocation().getWorld().getName(), creationPrice); if (!r.transactionSuccess()) { plugin.debug("Economy transaction failed: " + r.errorMessage); executor.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED,