예제 #1
0
 @Override
 public boolean subtract(String playerName, double amount) {
   if (canAfford(playerName, amount)) {
     return plugin.setPlayerMoney(
         playerName, plugin.getPlayerMoneyDouble(playerName) - amount, false);
   }
   return false;
 }
예제 #2
0
 @Override
 public boolean canAfford(String playerName, double amount) {
   double balance = plugin.getPlayerMoneyDouble(playerName);
   if (balance >= amount) {
     return true;
   }
   return false;
 }
예제 #3
0
 @Override
 public boolean add(String playerName, double amount) {
   return plugin.setPlayerMoney(
       playerName, plugin.getPlayerMoneyDouble(playerName) + amount, false);
 }
예제 #4
0
 @Override
 public double getBalance(String playerName) {
   return plugin.getPlayerMoneyDouble(playerName);
 }