    001    package net.minecraft.client;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import java.applet.Applet;
    006    import java.applet.AppletStub;
    007    import java.net.MalformedURLException;
    008    import java.net.URL;
    009    import java.util.Map;
    010
    011    @SideOnly(Side.CLIENT)
    012    public class MinecraftFakeLauncher extends Applet implements AppletStub
    013    {
    014        /** Arguments that were passed to Minecraft.jar (username, sessionid etc) */
    015        final Map arguments;
    016
    017        public MinecraftFakeLauncher(Map par1Map)
    018        {
    019            this.arguments = par1Map;
    020        }
    021
    022        public void appletResize(int par1, int par2) {}
    023
    024        public boolean isActive()
    025        {
    026            return true;
    027        }
    028
    029        public URL getDocumentBase()
    030        {
    031            try
    032            {
    033                return new URL("http://www.minecraft.net/game/");
    034            }
    035            catch (MalformedURLException var2)
    036            {
    037                var2.printStackTrace();
    038                return null;
    039            }
    040        }
    041
    042        public String getParameter(String par1Str)
    043        {
    044            if (this.arguments.containsKey(par1Str))
    045            {
    046                return (String)this.arguments.get(par1Str);
    047            }
    048            else
    049            {
    050                System.err.println("Client asked for parameter: " + par1Str);
    051                return null;
    052            }
    053        }
    054    }