File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
loader/src/main/java/com/fox2code/foxloader/installer Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -344,13 +344,20 @@ public void extractMMCInstance(String baseFileName) {
344344 }
345345
346346 public void extractServer () {
347+ String fileName = Main .currentInstallerFile .getName ();
348+ if (fileName .endsWith ("-installer.jar" )) {
349+ fileName = fileName .replace ("-installer.jar" , ".jar" );
350+ }
351+ this .extractServer (fileName );
352+ }
353+
354+ public void extractServer (String baseFileName ) {
347355 if (this .checkInstaller (true )) {
348356 return ;
349357 }
350358
351- String fileName = Main .currentInstallerFile .getName ();
352359 File serverDest = new File (Main .currentInstallerFile .getParentFile (),
353- fileName .substring (0 , fileName .length () - 4 ) + "-server.jar" );
360+ baseFileName .substring (0 , baseFileName .length () - 4 ) + "-server.jar" );
354361 try (ZipInputStream zipInputStream = new ZipInputStream (
355362 Files .newInputStream (Main .currentInstallerFile .toPath ()));
356363 ZipOutputStream zipOutputStream = new ZipOutputStream (
Original file line number Diff line number Diff line change @@ -89,8 +89,10 @@ public static void main(String[] args) throws Throwable {
8989 Files .copy (currentInstallerFile .toPath (), newName .toPath ());
9090 }
9191 installerGUI .extractMMCInstance ("fox" + installerName );
92+ installerGUI .extractServer ("fox" + installerName );
9293 } else {
9394 installerGUI .extractMMCInstance ();
95+ installerGUI .extractServer ();
9496 }
9597 return ;
9698 }
You can’t perform that action at this time.
0 commit comments