Package com.iCo6.system

Examples of com.iCo6.system.Holdings.subtract()


            Messaging.send(sender, tag + template.parse());
            return false;
        }

        Account account = new Account(name);
        holdings.subtract(amount);
        account.getHoldings().add(amount);

        template.set(Template.Node.PAYMENT_TO);
        template.add("name", name);
        template.add("amount", iConomy.format(amount));
View Full Code Here


            return new EconomyResponse(0, 0, ResponseType.FAILURE, "Cannot withdraw negative funds");
        }

        Holdings holdings = accounts.get(playerName).getHoldings();
        if (holdings.hasEnough(amount)) {
            holdings.subtract(amount);
            return new EconomyResponse(amount, holdings.getBalance(), ResponseType.SUCCESS, null);
        } else {
            return new EconomyResponse(0, holdings.getBalance(), 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.