Package com.palmergames.bukkit.towny

Examples of com.palmergames.bukkit.towny.NotRegisteredException


                }
        }

        public boolean removeAlly(Nation nation) throws NotRegisteredException {
                if (!hasAlly(nation))
                        throw new NotRegisteredException();
                else
                        return getAllies().remove(nation);
        }
View Full Code Here


                       
        }

        public boolean removeEnemy(Nation nation) throws NotRegisteredException {
                if (!hasEnemy(nation))
                        throw new NotRegisteredException();
                else
                        return getEnemies().remove(nation);
        }
View Full Code Here

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

                return numResidents;
        }

        public void removeTown(Town town) throws EmptyNationException, NotRegisteredException {
                if (!hasTown(town))
                        throw new NotRegisteredException();
                else {

                        boolean isCapital = town.isCapital();
                        remove(town);
                       
View Full Code Here

                        townBlocks.add(townBlock);
        }

        public void removeTownBlock(TownBlock townBlock) throws NotRegisteredException {
                if (!hasTownBlock(townBlock))
                        throw new NotRegisteredException();
                else
                        townBlocks.remove(townBlock);
        }
View Full Code Here

    }
  }

  public Town getTown() throws NotRegisteredException {
    if (!hasTown())
      throw new NotRegisteredException();
    return town;
  }
View Full Code Here

    }
  }

  public Resident getResident() throws NotRegisteredException {
    if (!hasResident())
      throw new NotRegisteredException();
    return resident;
  }
View Full Code Here

  }

  public TownBlock getTownBlock(Coord coord) throws NotRegisteredException {
    TownBlock townBlock = townBlocks.get(coord);
    if (townBlock == null)
      throw new NotRegisteredException();
    else
      return townBlock;
  }
View Full Code Here

    return townBlocks.values();
  }

  public void removeTown(Town town) throws NotRegisteredException {
    if (!hasTown(town))
      throw new NotRegisteredException();
    else {
      towns.remove(town);
      /*
      try {
        town.setWorld(null);
View Full Code Here

    try {
      resident = universe.getResidentMap().get(universe.checkAndFilterName(name).toLowerCase());
    } catch (InvalidNameException e) {
    }
    if (resident == null)
      throw new NotRegisteredException(String.format("The resident '%s' is not registered.", name));

    return resident;
  }
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.