mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Do not charge taxes if player is buying from their own shop
This commit is contained in:
1 parent
ec1fe83f18
commit
899eb70b84
1 file changed
+4
@@ -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()))));
|
||||
|
||||
Reference in new issue
Block a user