Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi there!

I can't figure out how to make my tellraw comment to get the clickevent action and open up an url.

My code so far:

ICommand command = new CommandMessageRaw();
ClickEvent clickevent = new ClickEvent(Action.OPEN_URL, "http://www.google.hu");
CommandMessageRaw.func_152373_a(player, command, "Test", this.equals(clickevent)); //Im not sure about the last parameter.

 

The message appears in the chat but its not clickable.

If you can please help me. Thanks!

I usually open up a browser this way.  Create a class like:

import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import net.minecraft.client.gui.ScaledResolution;

public class Browser {

public static void browse(String parUrl) {
	// Create Desktop object
    Desktop d=Desktop.getDesktop();

    // Browse a URL, say google.com
    try {
		d.browse(new URI(parUrl));
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (URISyntaxException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

    ScaledResolution sr;
}
}

 

Then you can open browser with:

Browse.browse("http://www.google.hu");

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

  • Author

Thats a good way, but not for me.

I made a mod update detector that now finally works.

If there is an update its have sends a tellraw message what you can click to bring up the mod webpage.

I don't want to force the player to open up a webbrowser every time he/she join to a world.

Thanks for your help trought!

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.