Can I teleport a Player by clicking on a JSON chat message?

Discussion in 'Plugin Development' started by looloosha, Apr 1, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    looloosha

    Hello all,

    I'm trying to make a utility plugin that will allow me to teleport to players by clicking on a JSON chat message prompted in chat. Is there a way to tell if the player clicked the message?

    Thanks,

    I really appreciate all the help.
     
  2. Offline

    nverdier

    @looloosha You could have them run a command that teleports them somewhere...
     
  3. Offline

    ItsMattHogan

  4. Offline

    nverdier

    @ItsMattHogan Well you can't make it teleport them when they click it. You have to make them run a command.
     
  5. Offline

    looloosha

    @nverdier How would I go about doing this if you could elaborate a bit?
     
  6. You could make them run the command: /supersecretcommandtoteleportsomewhere
    and use the PlayerCommandPreprocessEvent to check if the command is /supersecretcommandtoteleportsomewhere
     
  7. Offline

    looloosha

    @FisheyLP How exactly to I MAKE them run a command when the button is pushed?
     
  8. Offline

    nverdier

    @looloosha Use JSON and the click event 'RUN_COMMAND'.
     
  9. Offline

    looloosha

    @nverdier Can you provide some example code please?
     
  10. Offline

    nverdier

  11. Offline

    ItsMattHogan

    Look at the example I gave you...
     
  12. Offline

    nverdier

    @looloosha

    Just saying: That page says
     
  13. Offline

    looloosha

    @nverdier Example code wouldn't really be spoon feeding. You would be helping he community as other people might want to learn how to execute commands on a click and might stumble upon this post.

    Thanks for all the help you provided regardless! :D
     
Thread Status:
Not open for further replies.

Share This Page