From fb677a7489201163de7d8ad1960ba8404a8f8a10 Mon Sep 17 00:00:00 2001 From: TheKodeToad Date: Thu, 3 Nov 2022 17:45:37 +0000 Subject: [PATCH] So turns out we can have nice things Signed-off-by: TheKodeToad --- .../org/prismlauncher/launcher/impl/AbstractLauncher.java | 1 - .../org/prismlauncher/launcher/impl/StandardLauncher.java | 2 -- .../org/prismlauncher/launcher/impl/legacy/LegacyFrame.java | 4 +++- .../prismlauncher/launcher/impl/legacy/LegacyLauncher.java | 2 ++ 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libraries/launcher/org/prismlauncher/launcher/impl/AbstractLauncher.java b/libraries/launcher/org/prismlauncher/launcher/impl/AbstractLauncher.java index 391f71a9..7677df56 100644 --- a/libraries/launcher/org/prismlauncher/launcher/impl/AbstractLauncher.java +++ b/libraries/launcher/org/prismlauncher/launcher/impl/AbstractLauncher.java @@ -62,7 +62,6 @@ import org.prismlauncher.utils.Parameters; import org.prismlauncher.utils.StringUtils; import java.util.ArrayList; -import java.util.Collections; import java.util.List; public abstract class AbstractLauncher implements Launcher { diff --git a/libraries/launcher/org/prismlauncher/launcher/impl/StandardLauncher.java b/libraries/launcher/org/prismlauncher/launcher/impl/StandardLauncher.java index 8ecfffb4..40a35473 100644 --- a/libraries/launcher/org/prismlauncher/launcher/impl/StandardLauncher.java +++ b/libraries/launcher/org/prismlauncher/launcher/impl/StandardLauncher.java @@ -61,8 +61,6 @@ import org.prismlauncher.utils.Parameters; import org.prismlauncher.utils.ReflectionUtils; import java.lang.invoke.MethodHandle; -import java.util.ArrayList; -import java.util.List; public final class StandardLauncher extends AbstractLauncher { diff --git a/libraries/launcher/org/prismlauncher/launcher/impl/legacy/LegacyFrame.java b/libraries/launcher/org/prismlauncher/launcher/impl/legacy/LegacyFrame.java index 3cc10238..8f468cf6 100644 --- a/libraries/launcher/org/prismlauncher/launcher/impl/legacy/LegacyFrame.java +++ b/libraries/launcher/org/prismlauncher/launcher/impl/legacy/LegacyFrame.java @@ -60,6 +60,8 @@ package org.prismlauncher.launcher.impl.legacy; import net.minecraft.Launcher; import javax.imageio.ImageIO; +import javax.swing.JFrame; + import java.applet.Applet; import java.awt.Dimension; import java.awt.Frame; @@ -76,7 +78,7 @@ import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; -public final class LegacyFrame extends Frame /* TODO consider JFrame */ { +public final class LegacyFrame extends JFrame { private static final Logger LOGGER = Logger.getLogger("LegacyFrame"); diff --git a/libraries/launcher/org/prismlauncher/launcher/impl/legacy/LegacyLauncher.java b/libraries/launcher/org/prismlauncher/launcher/impl/legacy/LegacyLauncher.java index 5395acec..4defa8f3 100644 --- a/libraries/launcher/org/prismlauncher/launcher/impl/legacy/LegacyLauncher.java +++ b/libraries/launcher/org/prismlauncher/launcher/impl/legacy/LegacyLauncher.java @@ -121,6 +121,8 @@ public final class LegacyLauncher extends AbstractLauncher { window.start(this.user, this.session, this.width, this.height, this.maximize, this.serverAddress, this.serverPort, this.mcParams.contains("--demo")); + + return; } catch (Throwable e) { LOGGER.log(Level.SEVERE, "Running applet wrapper failed with exception; falling back to main class", e); }