5

I have seen links in servers that can send you to a page in a browser, is there any way to replicate this with command blocks?

I don't mean command links, I mean web pages.

1
  • So like, if a command block is powered -> open webpage?
    – NBN-Alex
    Oct 22 '16 at 8:23
6

The /tellraw command allows you to output to chat with more formatting options than /say. You'll need to use this, and the JSON format that it uses, to add clickable links to chat.

Here's a guide to the format tellraw (and signs, books and titles) use, if you are not already familiar with it.

Links can be added using the open_url click event. Example:

/tellraw @p {"text":"Arqade","clickEvent":{"action":"open_url","value":"http://gaming.stackexchange.com"}}

Here's a tellraw generator that allows you to add open_url click events, which is usually easier than writing it manually.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.