Solved open link

Discussion in 'Spigot Plugin Development' started by Aspens, Apr 29, 2017.

  1. Would it be possible to ask the user if they want to open a link? (Programatically)
    or is it too much of a security hazard
    Code (Java):

    if ((i.getItemMeta().getDisplayName().contains("" + ChatColor.GREEN)))
      // open link
     
     
  2. Do you wan't to explain it a bit more please?
     
  3. pretty sure you can only use json / chat components to open a url. so you're limited to: book text, chat text
     
    • Agree Agree x 1
  4. It's impossible to force a player to open a link, the most you can do is send them a message with the link, they can then click the link and go to the site
     
  5. You can use player.sendmessage(); right? Because I'm using it and I still can open the link.
     
  6. Yes. You are correct