Package com.greatmancode.craftconomy3.account

Examples of com.greatmancode.craftconomy3.account.Account.withdraw()


    }

    double balance;
    Account account = Common.getInstance().getAccountManager().getAccount(playerName);
    if (account.hasEnough(amount, worldName, Common.getInstance().getCurrencyManager().getDefaultCurrency().getName())) {
      balance = account.withdraw(amount, worldName, Common.getInstance().getCurrencyManager().getDefaultCurrency().getName(), Cause.VAULT, null);
      return new EconomyResponse(amount, balance, ResponseType.SUCCESS, "");
    } else {
      return new EconomyResponse(0, getBalance(playerName, worldName), ResponseType.FAILURE, "Insufficient funds");
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.