Jump to content

Make Button URL go streight to URL without Confirmation GUI


ScottehBoeh

Recommended Posts

I have a button on my Custom GUI that goes to a website, but it opens the "Are you sure you want to visit this link" message:

 

    public void actionPerformed(GuiButton button)

    {

        if (button.id == 1) {

            Minecraft.getMinecraft().displayGuiScreen(new GuiMainMenuHome());

        }

        //DISPLAY UPDATES

        if (button.id == 10) {

            Minecraft.getMinecraft().displayGuiScreen(new GuiMainMenuUpdates());

        }

        if (button.id == 2) {

            Minecraft.getMinecraft().displayGuiScreen(new GuiMainMenuPlay());

        }

        if (button.id == 25565) {

            Minecraft.getMinecraft().displayGuiScreen(new GuiConnecting(this, mc, MainMenu.instance.IP, MainMenu.instance.PORT));

        }

        //DISPLAY NEWS

        if (button.id == 11) {

            guiContainerDisplayText.setContent(MainMenu.instance.news.getNews());

        }

        if (button.id == 3) {

            Minecraft.getMinecraft().displayGuiScreen(new GuiConfirmOpenLink(this, URL, 20, true));

        }

        if (button.id == 8) {

            Minecraft.getMinecraft().displayGuiScreen(new GuiConfirmOpenLink(this, URL2, 22, true));

        }

        if (button.id == 5) {

            Minecraft.getMinecraft().displayGuiScreen(new GuiOptions(this, mc.gameSettings));

        }

        if (button.id == 6) {

            Minecraft.getMinecraft().shutdown();

        }

    }

 

 

 

The "URL" and "URL2" are the links Strings, anyone know what GUI I should go to instead of ConfirmOpenLink

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.