aboutsummaryrefslogtreecommitdiff
path: root/libraries/launcher/net
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/launcher/net')
-rw-r--r--libraries/launcher/net/minecraft/Launcher.java30
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) {