From 899eb70b84bee6c54b646662854b8d7ffdd0921f Mon Sep 17 00:00:00 2001 From: Kai Date: Fri, 27 May 2016 11:09:45 +0200 Subject: [PATCH] Do not charge taxes if player is buying from their own shop --- src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java b/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java index d3895e228..0bafd6509 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java @@ -459,6 +459,10 @@ public class ShopManager { // themselves. // Do charge an amount of tax though. double tax = plugin.getConfig().getDouble("tax"); + if (shop.getOwner().equals(p.getUniqueId())) { + tax = 0; + } + double total = amount * shop.getPrice(); if (!plugin.getEcon().withdraw(p.getUniqueId(), total)) { p.sendMessage(MsgUtil.getMessage("you-cant-afford-to-buy", format(amount * shop.getPrice()), format(plugin.getEcon().getBalance(p.getName()))));