diff options
author | icelimetea <fr3shtea@outlook.com> | 2022-05-03 03:19:26 +0100 |
---|---|---|
committer | icelimetea <fr3shtea@outlook.com> | 2022-05-03 03:19:26 +0100 |
commit | 9a87ae575ef58bb86d4bbd7bdb8ab7e026ad9a33 (patch) | |
tree | 7f1146786cce41630dfc1d7eebf3f5594e8d2f19 /libraries/launcher/net | |
parent | 860a7af6796785898926bcf10b034545caa5401b (diff) | |
download | PrismLauncher-9a87ae575ef58bb86d4bbd7bdb8ab7e026ad9a33.tar.gz PrismLauncher-9a87ae575ef58bb86d4bbd7bdb8ab7e026ad9a33.tar.bz2 PrismLauncher-9a87ae575ef58bb86d4bbd7bdb8ab7e026ad9a33.zip |
More minor fixes
Diffstat (limited to 'libraries/launcher/net')
-rw-r--r-- | libraries/launcher/net/minecraft/Launcher.java | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/libraries/launcher/net/minecraft/Launcher.java b/libraries/launcher/net/minecraft/Launcher.java index 04201047..265fa66a 100644 --- a/libraries/launcher/net/minecraft/Launcher.java +++ b/libraries/launcher/net/minecraft/Launcher.java @@ -24,22 +24,20 @@ import java.net.URL; import java.util.Map; import java.util.TreeMap; -public class Launcher extends Applet implements AppletStub { +public final class Launcher extends Applet implements AppletStub { private final Map<String, String> params = new TreeMap<>(); - private boolean active = false; + private final Applet wrappedApplet; - private Applet wrappedApplet; - private URL documentBase; + private boolean active = false; - public Launcher(Applet applet, URL documentBase) { + public Launcher(Applet applet) { this.setLayout(new BorderLayout()); this.add(applet, "Center"); this.wrappedApplet = applet; - this.documentBase = documentBase; } public void setParameter(String name, String value) @@ -47,21 +45,6 @@ public class Launcher extends Applet implements AppletStub { params.put(name, value); } - public void replace(Applet applet) { - this.wrappedApplet = applet; - - applet.setStub(this); - applet.setSize(getWidth(), getHeight()); - - this.setLayout(new BorderLayout()); - this.add(applet, "Center"); - - applet.init(); - active = true; - applet.start(); - validate(); - } - @Override public String getParameter(String name) { String param = params.get(name); @@ -135,9 +118,8 @@ public class Launcher extends Applet implements AppletStub { public URL getDocumentBase() { try { // Special case only for Classic versions - if (wrappedApplet.getClass().getCanonicalName().startsWith("com.mojang")) { - return new URL("http", "www.minecraft.net", 80, "/game/", null); - } + if (wrappedApplet.getClass().getCanonicalName().startsWith("com.mojang")) + return new URL("http", "www.minecraft.net", 80, "/game/"); return new URL("http://www.minecraft.net/game/"); } catch (MalformedURLException e) { |