mirror of
https://github.com/amalthea-mc/Ore-Market.git
synced 2024-11-08 20:00:59 +00:00
Implement handling 0% tax
This commit is contained in:
parent
05627a4b33
commit
841779c52b
@ -32,8 +32,13 @@ public class InventoryEvents implements Listener {
|
||||
OreMarket.getEconomy().depositPlayer((OfflinePlayer) Player, Money);
|
||||
}
|
||||
public void takeMoney (double Money, HumanEntity Player) { // Buy
|
||||
double tax = OreMarket.main().getConfig().getDouble("tax");
|
||||
double total = (Money + (Money/tax));
|
||||
double tax = OreMarket.main().getConfig().getDouble("tax", 0.0);
|
||||
double total;
|
||||
if (tax == 0.0) {
|
||||
total = Money;
|
||||
} else {
|
||||
total = (Money + (Money/tax));
|
||||
}
|
||||
OreMarket.getEconomy().withdrawPlayer((OfflinePlayer) Player, total);
|
||||
}
|
||||
public double balance (HumanEntity Player) {
|
||||
|
Loading…
Reference in New Issue
Block a user