Custom tellraw url in Minecraft

Solution 1:

As far as I know, this is impossible. The "value" field of a "clickEvent" object can only be a simple string, not another JSON object itself. There seems to also be no other way of piecing together e.g. something to be copied to the player's clipboard.

The best you can do is to just output the link to chat as text:

/tellraw @p [{"text":"https://gaming.stackexchange.com/users/"},{"score":{"name":"@p","objective":"number"}}]

When this is executed, a line similar to this one appears in the targeted player's game log:

[03:32:08] [Render thread/INFO]: [CHAT] https://gaming.stackexchange.com/users/171580

In some text editors the player can then e.g. double-click on the link, in others the link needs to be copied and pasted into a browser.