Examples of EconomyInterface


Examples of com.bekvon.bukkit.residence.economy.EconomyInterface

        }
        PermissionGroup limits = Residence.getPermissionManager().getGroup(player);
        int max = limits.getMaxLeaseTime();
        int add = limits.getLeaseGiveTime();
        int rem = daysRemaining(area);
        EconomyInterface econ = Residence.getEconomyManager();
        if(econ!=null)
        {
            double cost = limits.getLeaseRenewCost();
            ClaimedResidence res = manager.getByName(area);
            int amount = (int) Math.ceil((double)res.getTotalSize() * cost);
            if(cost!=0D)
            {
                //Account account = iConomy.getBank().getAccount(player.getName());
                if(econ.canAfford(player.getName(), amount)/*account.hasEnough(amount)*/)
                {
                    econ.subtract(player.getName(), amount);
                    econ.add("Lease Money", amount);
                    player.sendMessage(ChatColor.GREEN+Residence.getLanguage().getPhrase("MoneyCharged",ChatColor.YELLOW + String.format("%d",amount)+ChatColor.GREEN+"."+ChatColor.YELLOW + econ.getName() + ChatColor.GREEN));
                }
                else
                {
                    player.sendMessage(ChatColor.RED+Residence.getLanguage().getPhrase("NotEnoughMoney"));
                    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.