Beispiel #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;
 }
Beispiel #2
0
 @Override
 public boolean canAfford(String playerName, double amount) {
   double balance = plugin.getPlayerMoneyDouble(playerName);
   if (balance >= amount) {
     return true;
   }
   return false;
 }
Beispiel #3
0
 @Override
 public boolean add(String playerName, double amount) {
   return plugin.setPlayerMoney(
       playerName, plugin.getPlayerMoneyDouble(playerName) + amount, false);
 }
Beispiel #4
0
 @Override
 public double getBalance(String playerName) {
   return plugin.getPlayerMoneyDouble(playerName);
 }