From 0d9dd5a83a2113b5f260c0a293eda2bce5f680ef Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Sat, 9 Nov 2019 10:15:49 +0800 Subject: [PATCH] #203 - Permission to bypass Tax Former-commit-id: 884e5fef7f6e57791dd363f127a8001357f36e2e [formerly 36e9ac432330332acf0561ebcbfe2e8d4d89ab40] Former-commit-id: 22ffefbed8116567e018019cdb169440812ef358 --- .../java/org/maxgamer/quickshop/Shop/ShopManager.java | 10 ++++++++-- src/main/resources/plugin.yml | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java b/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java index d44c0dcf0..a9080373e 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java @@ -83,7 +83,10 @@ public class ShopManager { // Money handling double tax = plugin.getConfig().getDouble("tax"); double total = amount * shop.getPrice(); - + if(p.hasPermission("quickshop.tax")){ + tax = 0; + Util.debugLog("Disable the Tax for player "+p.getName()+" cause they have permission quickshop.tax"); + } if (tax < 0) { tax = 0; //Tax was disabled. } @@ -326,7 +329,10 @@ public class ShopManager { // Money handling double tax = plugin.getConfig().getDouble("tax"); double total = amount * shop.getPrice(); - + if(p.hasPermission("quickshop.tax")){ + tax = 0; + Util.debugLog("Disable the Tax for player "+p.getName()+" cause they have permission quickshop.tax"); + } if (tax < 0) { tax = 0; //Tax was disabled. } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 4caefa5f5..d1b946656 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -92,3 +92,6 @@ permissions: quickshop.preview: description: Permission for preview item to use a GUI default: true + quickshop.tax: + description: Permission to bypass Tax + default: op