Package com.palmergames.bukkit.towny.object

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


            plugin.updateCache();
            return true;
          } else if (town.isMayor(resident) || town.hasAssistant(resident)) {
            //Plot isn't for sale but re-possessing for town.
           
            if (TownySettings.isUsingEconomy() && !town.payTo(0.0, owner, "Plot - Buy Back"))
              throw new TownyException(TownySettings.getLangString("msg_town_no_money_purchase_plot"));
           
            TownyMessaging.sendTownMessage(town, TownySettings.getBuyResidentPlotMsg(town.getName(), owner.getName(), 0.0));
            townBlock.setResident(null);
            townBlock.setPlotPrice(-1);
View Full Code Here


    Town oldTown = new Town(oldName);

    try {
      town.pay(town.getHoldingBalance(), "Rename Town - Empty account of new town name.");
      oldTown.payTo(oldTown.getHoldingBalance(), town, "Rename Town - Transfer to new account");
    } catch (EconomyException e) {
    }

    for (Resident resident : toSave) {
      saveResident(resident);
View Full Code Here

            } catch (NotRegisteredException e) {
              plugin.getTownyUniverse().getWarEvent().remove(town);
            }
          } else
            TownyMessaging.sendTownMessage(town, defenderResident.getName() + "'s wallet couldn't satisfy " + attackerResident.getName() + ". " + townPrice + " taken from town bank.");
          town.payTo(townPrice, attackerResident, String.format("Death Payment (War) (%s couldn't pay)", defenderResident.getName()));
        }
      } catch (NotRegisteredException e) {
      } catch (EconomyException e) {
        TownyMessaging.sendErrorMsg(attackerPlayer, "Could not take wartime death funds.");
        TownyMessaging.sendErrorMsg(defenderPlayer, "Could not take wartime death 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.