File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/main/java/gg/essential/ad Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,13 @@ public static boolean installationCompleted() {
4242 public static boolean installContainer () {
4343 try {
4444 Path destination = Paths .get ("mods" , "essential-container.jar" );
45- if (Files .exists (destination )) throw new RuntimeException ("fix me!" ); // fixme filename conflicts
45+ if (Files .exists (destination )) {
46+ int i = 1 ;
47+ do {
48+ destination = Paths .get ("mods" , "essential-container-" + i + ".jar" );
49+ i ++;
50+ } while (Files .exists (destination ));
51+ }
4652 try (InputStream is = EssentialUtil .class .getResourceAsStream ("container.jarx" )) {
4753 if (is == null ) throw new IllegalStateException ("No bundled container jar found!" );
4854 Files .copy (is , destination );
You can’t perform that action at this time.
0 commit comments