Prevent HMCL 2.x updating
This commit is contained in:
@@ -48,7 +48,6 @@ final class LocalRepository {
|
|||||||
private LocalRepository() {}
|
private LocalRepository() {}
|
||||||
|
|
||||||
private static Path localStorage = Launcher.HMCL_DIRECTORY.toPath().resolve("hmcl.jar");
|
private static Path localStorage = Launcher.HMCL_DIRECTORY.toPath().resolve("hmcl.jar");
|
||||||
private static Path hmclVersionJson = Launcher.HMCL_DIRECTORY.toPath().resolve("hmclver.json");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current stored executable in local repository.
|
* Gets the current stored executable in local repository.
|
||||||
@@ -70,14 +69,6 @@ final class LocalRepository {
|
|||||||
} else {
|
} else {
|
||||||
Files.copy(source, localStorage, StandardCopyOption.REPLACE_EXISTING);
|
Files.copy(source, localStorage, StandardCopyOption.REPLACE_EXISTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional<LocalVersion> stored = getStored();
|
|
||||||
if (stored.isPresent()) {
|
|
||||||
Map<String, String> json = new HashMap<>();
|
|
||||||
json.put("ver", stored.get().getVersion());
|
|
||||||
json.put("loc", stored.get().getLocation().toString());
|
|
||||||
FileUtils.writeText(hmclVersionJson.toFile(), Constants.GSON.toJson(json));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user