Package com.earth2me.essentials.register.payment.Method

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

TOP

Related Classes of com.earth2me.essentials.register.payment.Method.MethodAccount

Copyright © 2018 www.massapicom. 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.