public static Vector<Region> loadAllRegions(File saveFolder) throws IOException {
  Vector<Region> ret=new Vector<Region>();
  File dir=new File(saveFolder.getAbsoluteFile() + "/region");
  if (!dir.exists() || !dir.isDirectory())   throw new FileNotFoundException(dir.getAbsolutePath());
  File[] files=dir.listFiles();
  for (  File f : files) {
    String name=f.getName();
    if (name.matches("r\\.[0-9[-]]+\\.[0-9[-]]+\\.mca")) {
      ret.add(new Region(f));
    }
  }
  if (ret.size() == 0) {
    for (    File f : files) {
      String name=f.getName();
      if (name.matches("r\\.[0-9[-]]+\\.[0-9[-]]+\\.mcr")) {
        ret.add(new Region(f));
      }
    }
  }
  return ret;
}

public static Vector < Region > loadAllRegions ( File saveFolder ) throws IOException { Vector < Region > ret = new Vector < Region > ( ) ; File dir = new File ( saveFolder . getAbsoluteFile ( ) + "/region" ) ; if ( ! dir . exists ( ) || ! dir . isDirectory ( ) ) throw new FileNotFoundException ( dir . getAbsolutePath ( ) ) ; File [ ] files = dir . listFiles ( ) ; for ( File f : files ) { String name = f . getName ( ) ; if ( name . matches ( "r\\.[0-9[-]]+\\.[0-9[-]]+\\.mca" ) ) { ret . add ( new Region ( f ) ) ; } } if ( ret . size ( ) == 0 ) { for ( File f : files ) { String name = f . getName ( ) ; if ( name . matches ( "r\\.[0-9[-]]+\\.[0-9[-]]+\\.mcr" ) ) { ret . add ( new Region ( f ) ) ; } } } return ret ; }
get the list of all regions in the given save .
