public MinecraftDirectory(File rootDir){
  Objects.requireNonNull(rootDir);
  this.rootDir=rootDir.getAbsoluteFile();
}

public MinecraftDirectory ( File rootDir ) { Objects . requireNonNull ( rootDir ) ; this . rootDir = rootDir . getAbsoluteFile ( ) ; }
creates a minecraftdirectory with the given root directory .
