From a479383fc9f67241cb4000e6bf98d9be95852fcd Mon Sep 17 00:00:00 2001 From: NotCoded <66999075+not-coded@users.noreply.github.com> Date: Sun, 22 Oct 2023 16:11:04 +0200 Subject: [PATCH] fix minor bug (if you cant fix it then remove it!) --- src/main/java/com/nexia/installer/Main.java | 5 ++-- .../util/fabric/FabricInstallerHelper.java | 23 +------------------ 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/nexia/installer/Main.java b/src/main/java/com/nexia/installer/Main.java index d28abf0..570505a 100644 --- a/src/main/java/com/nexia/installer/Main.java +++ b/src/main/java/com/nexia/installer/Main.java @@ -36,14 +36,13 @@ public ResourceBundle newBundle(String baseName, Locale locale, String format, C public static void main(String[] args) throws UnsupportedLookAndFeelException, ClassNotFoundException, InstantiationException, IllegalAccessException { + os = OS.LINUX; + if(System.getProperty("os.name").startsWith("Windows")){ os = OS.WINDOWS; System.setProperty("javax.net.ssl.trustStoreType", "WINDOWS-ROOT"); } - if(System.getProperty("os.name").startsWith("lin")) - os = OS.LINUX; - if(System.getProperty("os.name").startsWith("mac")) os = OS.MAC; diff --git a/src/main/java/com/nexia/installer/util/fabric/FabricInstallerHelper.java b/src/main/java/com/nexia/installer/util/fabric/FabricInstallerHelper.java index f67b642..07334fb 100644 --- a/src/main/java/com/nexia/installer/util/fabric/FabricInstallerHelper.java +++ b/src/main/java/com/nexia/installer/util/fabric/FabricInstallerHelper.java @@ -100,29 +100,8 @@ public void launch() throws IOException { throw new RuntimeException(Main.BUNDLE.getString("installer.exception.no.launcher.directory")); } - final ProfileInstaller profileInstaller = new ProfileInstaller(mcPath); - ProfileInstaller.LauncherType launcherType; - String launcherThing = ""; - - // can you tell i have no fucking idea what im doing? - if(InstallerHelper.createProfile.isSelected()) { - List types = profileInstaller.getInstalledLauncherTypes(); - - if (types.isEmpty()) { - throw new RuntimeException(Main.BUNDLE.getString("installer.exception.no.launcher.profile")); - } else { - launcherType = InstallerUtils.showLauncherTypeSelection(); - - if (launcherType == null) { - return; - } - - launcherThing = "-launcher " + launcherType.name; - } - } - System.out.println("Installing Fabric " + gameVersion.getVersion() + " (" + gameVersion.getCodeName() + ")"); - String[] cmd2 = new String[]{"java", "-jar", "cache/" + getJarFile().getName(), "client", "-dir" + "\"" + mcPath.toAbsolutePath() + "\"", "-mcversion", gameVersion.codeName, launcherThing}; + String[] cmd2 = new String[]{"java", "-jar", "cache/" + getJarFile().getName(), "client", "-dir" + "\"" + mcPath.toAbsolutePath() + "\"", "-mcversion", gameVersion.codeName}; try {