Skip to content
This repository was archived by the owner on Aug 18, 2024. It is now read-only.

Commit f8e27b1

Browse files
committed
asndklnblka
1 parent e9673fc commit f8e27b1

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group 'com.redlimerl'
7-
version '0.4'
7+
version '0.5'
88
repositories {
99
mavenCentral()
1010
}

src/main/java/com/pistacium/modcheck/ModCheckConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
public class ModCheckConstants {
44

5-
public static final String APPLICATION_VERSION = "0.4";
5+
public static final String APPLICATION_VERSION = "0.5";
66

77
}

src/main/java/com/pistacium/modcheck/ModCheckFrame.java

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ private void initBottomLayout() {
131131

132132
downloadButton.setEnabled(false);
133133
Stack<File> modsFileStack = new Stack<>();
134+
135+
int ignoreInstance = -1;
136+
134137
for (File instanceDir : selectDirs) {
135138
Path instancePath = instanceDir.toPath();
136139
File dotMinecraft = instancePath.resolve(".minecraft").toFile();
@@ -141,11 +144,19 @@ private void initBottomLayout() {
141144
Path modsPath = instancePath.resolve("mods");
142145
File modsDir = modsPath.toFile();
143146
if (!modsDir.isDirectory()) {
144-
JOptionPane.showMessageDialog(this, "Please select a instance path(directory)!", "Please try again", JOptionPane.ERROR_MESSAGE);
145-
downloadButton.setEnabled(true);
146-
return;
147+
int result = ignoreInstance != -1 ? ignoreInstance : JOptionPane.showConfirmDialog(this, "You have selected a directory but not a minecraft instance directory.\nAre you sure you want to download in this directory?", "Wrong instance directory", JOptionPane.OK_CANCEL_OPTION);
148+
149+
System.out.println(result);
150+
if (result != 0) {
151+
downloadButton.setEnabled(true);
152+
return;
153+
} else {
154+
ignoreInstance = result;
155+
modsFileStack.push(instanceDir);
156+
}
157+
} else {
158+
modsFileStack.push(modsDir);
147159
}
148-
modsFileStack.push(modsDir);
149160
}
150161

151162
if (this.versionSelection.getSelectedItem() == null) {

0 commit comments

Comments
 (0)