public Location getTPPos(String regionName, World world) {
		Location loc = null;
		int blockIndex = -1;
//		World world = Bukkit.getServer().getWorld("world");
   	    if(existsRegion(regionName, world) ){
   	        ProtectedRegion target = _plugin.WORLDGUARD.getGlobalRegionManager().get(world).getRegion(regionName);
			if(!(getTeleLocation(regionName, world) == null)) {
				loc = getTeleLocation(regionName, world);
			} else {
				BlockVector min = target.getMinimumPoint();
				BlockVector max = target.getMaximumPoint();
				int maxX = (int) max.getX();
				int maxZ = (int) max.getZ();
				int x = (int) min.getX();
				int z = (int) min.getZ();
				int i = x;
				int j = z;
				for(x = (int) min.getX(); x < maxX; x++) {
					for(z = (int) min.getZ(); z < maxZ; z++) {
						if(blockIndex == -1) {
							blockIndex = getSafeBlock(x,z,world,target);
							i = x;
							j = z;
						}
						System.out.println(x+" "+blockIndex+" "+z);
					}
				}

				loc = new Location(world, new Double(i) + 0.5, blockIndex, new Double(j) + 0.5);
			}
		}
		if(blockIndex != -1 || loc != null)
			return loc;
		else
			return null;
    }