Minecraft – How to make a clickable text that sends you to a hyperlink

minecraft-commandsminecraft-java-edition

I'm trying to build a command that sends a tellraw message in chat, and when this is clicked, it sends you to a link.

This is the link I want it to send to: p.finsgraphics.com/15pVO

And this is the tellraw I want it to show: &f&lInFinite 16x &8&l1.9 3D &6&l[V1] &f&lDownload Link: &fp.finsgraphics.com/15pVO

I cannot change the default resource pack due to the fact my server is hosted on ANOTHER Minecraft server.

So, what I need is user clicks a sign, tellraw shows in chat, click tellraw, and send you to link.

Is this possible? How can I do it?

Best Answer

To add a link to text in a tellraw command, add a "clickEvent" object to each of the objects in your JSON of the tellraw. Then add a "action":"open_url" and a "value":"URL_HERE" value to each of the "clickEvent" objects, replacing URL_HERE with the url you want. So in the end it will look something like this:

/tellraw @p [{"text":"TEXT","clickEvent":{"action":"open_url","value":"http://example.com/"}}]

I ran your text through a tellraw generator, and added the clickEvent object with the values to it. Here is your command:

/tellraw @p [{"color":"white","bold":true,"text":"InFinite 16x ","clickEvent":{"action":"open_url","value":"http://p.finsgraphics.com/15pVO"}},{"bold":true,"color":"dark_gray","text":"1.9 3D ","clickEvent":{"action":"open_url","value":"http://p.finsgraphics.com/15pVO"}},{"bold":true,"color":"gold","text":"[V1] ","clickEvent":{"action":"open_url","value":"http://p.finsgraphics.com/15pVO"}},{"bold":true,"color":"white","text":"Download Link: ","clickEvent":{"action":"open_url","value":"http://p.finsgraphics.com/15pVO"}},{"bold":false,"color":"white","text":"p.finsgraphics.com/15pVO","clickEvent":{"action":"open_url","value":"http://p.finsgraphics.com/15pVO"}}]
Related Topic