Package com.palmergames.bukkit.towny.object

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


                            return;
                        }
                }
               
                // Show message if we are using iConomy and are charging for spawn travel.
                if (travelCost > 0 && TownySettings.isUsingEconomy() && resident.payTo(travelCost, town, String.format("Town Spawn (%s)", townSpawnPermission))) {
                  TownyMessaging.sendMsg(player, String.format(TownySettings.getLangString("msg_cost_spawn"),
                        TownyEconomyObject.getFormattedBalance(travelCost))); // + TownyEconomyObject.getEconomyCurrency()));
                }
               
               
View Full Code Here


                        }
                       
                        if (amount < 0)
                                throw new TownyException(TownySettings.getLangString("msg_err_negative_money"));
                       
                        if (!resident.payTo(amount, town, "Town Deposit"))
                                throw new TownyException(TownySettings.getLangString("msg_insuf_funds"));
                       
                        TownyMessaging.sendTownMessage(town, String.format(TownySettings.getLangString("msg_xx_deposited_xx"), resident.getName(), amount, "town"));
                } catch (TownyException x) {
                        TownyMessaging.sendErrorMsg(player, x.getMessage());
View Full Code Here

        try {
          Resident resident = townBlock.getResident();
          if (town.isMayor(resident) || town.hasAssistant(resident)) {
            continue;
          }
          if (!resident.payTo(townBlock.getType().getTax(town), town, String.format("Plot Tax (%s)", townBlock.getType()))) {
            TownyMessaging.sendTownMessage(town, String.format(TownySettings.getLangString("msg_couldnt_pay_plot_taxes"), resident));
            townBlock.setResident(null);
            TownyUniverse.getDataSource().saveResident(resident);
            TownyUniverse.getDataSource().saveWorld(townBlock.getWorld());
          }// else {
View Full Code Here

      }

      if (amount < 0)
        throw new TownyException(TownySettings.getLangString("msg_err_negative_money"));

      if (!resident.payTo(amount, nation, "Nation Deposit"))
        throw new TownyException(TownySettings.getLangString("msg_insuf_funds"));

      TownyMessaging.sendNationMessage(nation, String.format(TownySettings.getLangString("msg_xx_deposited_xx"), resident.getName(), amount, "nation"));
    } catch (TownyException x) {
      TownyMessaging.sendErrorMsg(player, x.getMessage());
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.