public void depositSilver(Player player, int amount) { Bank bank = banks.get(player.getName()); int a = amount; int b = getSilverBalance(player); int c = a + b; int d = (c - b) - 1; double e = c / 100; if (c < 100) { bank.setSilver(bank.getSilver() + amount); } else { depositGold(player, (int) e); bank.setSilver(d); } refreshBank(player); player.playSound(player.getLocation(), Sound.ORB_PICKUP, 1, (float) 0.8); }
public int getSilverBalance(Player player) { bank = banks.get(player.getName()); return bank.getSilver(); }