Package com.palmergames.bukkit.towny

Examples of com.palmergames.bukkit.towny.NotRegisteredException


    return mayor != null;
  }

  public void removeResident(Resident resident) throws EmptyTownException, NotRegisteredException {
    if (!hasResident(resident))
      throw new NotRegisteredException();
    else {

      remove(resident);

      if (getNumResidents() == 0)
View Full Code Here


    residents.remove(resident);
  }

  public void removeAssistant(Resident resident) throws NotRegisteredException {
    if (!hasAssistant(resident))
      throw new NotRegisteredException();
    else
      assistants.remove(resident);
  }
View Full Code Here

  }

  @Override
  public void removeTownBlock(TownBlock townBlock) throws NotRegisteredException {
    if (!hasTownBlock(townBlock))
      throw new NotRegisteredException();
    else {
      try {
        if (getHomeBlock() == townBlock)
          setHomeBlock(null);
      } catch (TownyException e) {
View Full Code Here

  */
  private void wartimeDeathPoints(Player attackerPlayer, Player defenderPlayer, Resident attackerResident, Resident defenderResident) {
    if (attackerPlayer != null && plugin.getTownyUniverse().isWarTime())
      try {
        if (attackerResident == null)
          throw new NotRegisteredException();

        Town town = attackerResident.getTown();
        if (TownySettings.getWarPointsForKill() > 0)
          plugin.getTownyUniverse().getWarEvent().townScored(town, TownySettings.getWarPointsForKill());
      } catch (NotRegisteredException e) {
View Full Code Here

  public void deathPayment(Player attackerPlayer, Player defenderPlayer, Resident attackerResident, Resident defenderResident) {
    if (attackerPlayer != null && plugin.getTownyUniverse().isWarTime() && TownySettings.getWartimeDeathPrice() > 0)
      try {
        if (attackerResident == null)
          throw new NotRegisteredException();

        double price = TownySettings.getWartimeDeathPrice();
        double townPrice = 0;
        if (!defenderResident.canPayFromHoldings(price)) {
          townPrice = price - defenderResident.getHoldingBalance();
View Full Code Here

TOP

Related Classes of com.palmergames.bukkit.towny.NotRegisteredException

Copyright © 2018 www.massapicom. 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.