We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7bb7f7c commit 145adafCopy full SHA for 145adaf
gui/src/main/java/org/mcphackers/mcp/main/MainGUI.java
@@ -280,6 +280,14 @@ public void changeWorkingDirectory() {
280
this.options.workingDir = p;
281
this.options.save();
282
VersionParser versionParser = VersionParser.getInstance();
283
+ Path versionPath = MCPPaths.get(this, MCPPaths.VERSION);
284
+ if (Files.exists(versionPath)) {
285
+ try {
286
+ currentVersion = Version.from(new JSONObject(new String(Files.readAllBytes(versionPath))));
287
+ } catch (JSONException | IOException e) {
288
+ e.printStackTrace();
289
+ }
290
291
this.frame.setCurrentVersion(this.currentVersion == null ? null : versionParser.getVersion(this.currentVersion.id));
292
this.frame.reloadText();
293
this.frame.reloadVersionList();
0 commit comments