Examples of MethodAccount


Examples of com.earth2me.essentials.register.payment.Method.MethodAccount

          Player player = member.getEntity().getPlayerPassenger();
          if (!method.hasAccount(player.getName())) {
            continue;
          }
          //actually perform something with it here
          MethodAccount account = method.getAccount(player.getName());

          if (mode.equalsIgnoreCase("add")) {
            account.add(money);
            Localization.TICKET_ADD.message(player, getCurrencyText(money));
          } else if (mode.equalsIgnoreCase("check")) {
            Localization.TICKET_CHECK.message(player, getCurrencyText(account.balance()));
          } else if (mode.equalsIgnoreCase("buy")) {
            if (account.hasUnder(money)) {
              Localization.TICKET_BUYFAIL.message(player, getCurrencyText(money));
              member.eject();
            } else {
              account.subtract(money);
              Localization.TICKET_BUY.message(player, getCurrencyText(money));
            }
          }
        }
      }
View Full Code Here

Examples of com.nijikokun.register.payment.Method.MethodAccount

  }

  public void setBalance(double value) {
    try {
      if (plugin.isRegister()) {
        MethodAccount account = (MethodAccount) getEconomyAccount();
        if (account != null) {
          account.set(value);
        } else {
          TownyMessaging.sendDebugMsg("Account is still null!");
        }
      } else {
        Account account = (Account) getEconomyAccount();
        if (account != null) {
          account.getHoldings().set(value);
        } else {
          TownyMessaging.sendDebugMsg("Account is still null!");
        }
      }
View Full Code Here

Examples of com.nijikokun.register.payment.Method.MethodAccount

  public double getHoldingBalance() throws EconomyException {
    try {
      TownyMessaging.sendDebugMsg("Economy Balance Name: " + getEconomyName());

      if (plugin.isRegister()) {
        MethodAccount account = (MethodAccount) getEconomyAccount();
        if (account != null) {
          TownyMessaging.sendDebugMsg("Economy Balance: " + account.balance());
          return account.balance();
        } else {
          TownyMessaging.sendDebugMsg("Account is still null!");
          return 0;
        }
      } else {
        Account account = (Account) getEconomyAccount();
        if (account != null) {
          TownyMessaging.sendDebugMsg("Economy Balance: " + account.getHoldings().balance());
          return account.getHoldings().balance();
        } else {
          TownyMessaging.sendDebugMsg("Account is still null!");
          return 0;
        }
      }
View Full Code Here

Examples of com.nijikokun.register.payment.Method.MethodAccount

  }

  public void removeAccount() {
    try {
      if (plugin.isRegister()) {
        MethodAccount account = (MethodAccount) getEconomyAccount();
        account.remove();

      } else if (plugin.isIConomy()) {
        iConomy.getAccount(getEconomyName()).remove();
      }
      return;
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.