Improved getting econ

This commit is contained in:
Stijn
2021-11-10 20:29:27 +01:00
parent 6893d7bac7
commit 755f8a4324
3 changed files with 26 additions and 17 deletions
@@ -37,7 +37,7 @@ public class BuyGUI extends GUIMerchant {
}
private void buy(VillagerType villagerType, Player player, Material material, int amount, Price price) {
Economy econ = VillagerUI.getEcon();
Economy econ = VillagerUI.getInstance().getEconomy();
double balance = econ.getBalance(player);
double cost = price.getPrice(amount);
@@ -38,7 +38,7 @@ public class SellGUI extends GUIMerchant {
}
private void sell(VillagerType villagerType, Player player, Material material, int amount, Price price) {
Economy econ = VillagerUI.getEcon();
Economy econ = VillagerUI.getInstance().getEconomy();
double cost = price.getPrice(amount);
EconUser econUser = EconUser.users.get(player.getUniqueId());
int oldPoints = econUser.getPointsMap().get(villagerType.getName());