if (TownySettings.getMaxDistanceBetweenHomeblocks() > 0)
if ((world.getMinDistanceFromOtherTowns(key) > TownySettings.getMaxDistanceBetweenHomeblocks()) && world.hasTowns())
throw new TownyException(TownySettings.getLangString("msg_too_far"));
if (TownySettings.isUsingEconomy() && !resident.pay(TownySettings.getNewTownPrice(), "New Town Cost"))
throw new TownyException(String.format(TownySettings.getLangString("msg_no_funds_new_town"), (resident.getName().equals(player.getName()) ? "You" : resident.getName())));
newTown(universe, world, name, resident, key, player.getLocation());
TownyMessaging.sendGlobalMessage(TownySettings.getNewTownMsg(player.getName(), name));
} catch (TownyException x) {