private static Path renameToVanillaNetherOrEnd(Path worldContainer,Path oldWorldPath,Path worldPath){
  final String newName=getVanillaNetherOrEndName(oldWorldPath);
  final Path newWorldPath=worldContainer.resolve(newName);
  if (isValidBukkitNetherOrEnd(worldContainer,oldWorldPath)) {
    if (Files.notExists(worldContainer.resolve(newName))) {
      return newWorldPath;
    }
  }
  return worldPath;
}

private static Path renameToVanillaNetherOrEnd ( Path worldContainer , Path oldWorldPath , Path worldPath ) { final String newName = getVanillaNetherOrEndName ( oldWorldPath ) ; final Path newWorldPath = worldContainer . resolve ( newName ) ; if ( isValidBukkitNetherOrEnd ( worldContainer , oldWorldPath ) ) { if ( Files . notExists ( worldContainer . resolve ( newName ) ) ) { return newWorldPath ; } } return worldPath ; }
renames the world at the provided path to the proper vanilla naming for nether and the_end , if needed . generally this is dim - 1 and dim1 for nether and the_end respectively .
