Examples of canPayFromHoldings()


Examples of com.palmergames.bukkit.towny.object.Resident.canPayFromHoldings()

           
            int maxPlots = TownySettings.getMaxResidentPlots(resident);
            if (maxPlots >= 0 && resident.getTownBlocks().size() + selection.size() > maxPlots)
              throw new TownyException(String.format(TownySettings.getLangString("msg_max_plot_own"), maxPlots));

            if (TownySettings.isUsingEconomy() && (!resident.canPayFromHoldings(cost)))
              throw new TownyException(String.format(TownySettings.getLangString("msg_no_funds_claim"), selection.size(), TownyEconomyObject.getFormattedBalance(cost)));

            // Start the claim task
            new PlotClaim(plugin, player, resident, selection, PlotClaim.Action.CLAIM).start();
View Full Code Here

Examples of com.palmergames.bukkit.towny.object.Town.canPayFromHoldings()

        }

        // Resident doesn't have enough funds.
        if (townPrice > 0) {
          Town town = defenderResident.getTown();
          if (!town.canPayFromHoldings(townPrice)) {
            // Town doesn't have enough funds.
            townPrice = town.getHoldingBalance();
            try {
              plugin.getTownyUniverse().getWarEvent().remove(attackerResident.getTown(), town);
            } catch (NotRegisteredException e) {
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.