1.15.2 Are multiple handlers possible in chat click event?

Discussion in 'Spigot Plugin Development' started by Proxxo, Feb 21, 2020.

  1. Hello,

    I am wondering, if I could pass multiple handlers to click events of a chat message.

    Given the following JSON:

    Code (Text):

        { "text": "Click " },
        { "text": "here", "clickEvent": { "action": "open_url", "value": "https://www.google.com" } },
        { "text": " to google." }
    how could I add another click event handler that i.e. makes the player run a command when clicking the link? I know I could replace "open_url" by "run_command" etc. but I just want both.

    I want to get informed when a player clicks on a link. I imagined that clicking the link could also make the player run "/clickedLink" command... Can I do this with event handlers or is some other approach better?