Skript: Links no longer clickable when using latest Skript version with Json fixes

Created on 2 May 2017  路  6Comments  路  Source: SkriptLang/Skript

Players are unable to click on any links in minecraft chat when using latest skript version.
Had to remove skript and replace it with older version of skript to make it work again.

Also players are unable to click on any betonquest answer of NPCs. Looks like similar issue here.

bug

Most helpful comment

I have resolved this problem (will be in next build). Now, there are three possible link parsing modes:

  • Disabled: doesn't parse links
  • Strict: parses links which have correct protocol at start
  • Lenient: parses anything which contains a dot as potential link and assumes the protocol is HTTP if not present

For old config files, false==disabled and true==lenient.

All 6 comments

@bensku The problem is that links currently must start with https:// for it to parse them as a link (according to the dev26f release notes), even though vanilla by default tries to parse basically anyone word containing a period as a link, e.g. saying "hey.how are you?" would try to parse "hey.how" as a URL. Even though it means some non-links will be registered as links, it's completely harmless and ensures that you don't have to have a full complete URL for it to parse (e.g. I can just say "go to github.com" and it'd work).

I'd recommend changing the URL parsing to happen for every word where a contains check for "." returns true as opposed to checking the beginning of the message for "https://".

@TheBentoBox it just parse links with http:// or https://, not everything with a dot.

@Snow-Pyon In vanilla you're correct, but otherwise you're not. This is a test in dev25 of me sending a URL without http[s]:// and it works:

image

And it even works on URLs that don't have valid extensions like .com, .gov, etc.:

image

That being the case, it should still work like this in dev26 too.

Ouch, time to rewrite link parsing once again... At least it should be relative simple.

I have resolved this problem (will be in next build). Now, there are three possible link parsing modes:

  • Disabled: doesn't parse links
  • Strict: parses links which have correct protocol at start
  • Lenient: parses anything which contains a dot as potential link and assumes the protocol is HTTP if not present

For old config files, false==disabled and true==lenient.

Nice implementation, you're a legend

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

wohahobg picture wohahobg  路  3Comments

Anoniempje1234 picture Anoniempje1234  路  3Comments

Snow-Pyon picture Snow-Pyon  路  4Comments

Coolfire02 picture Coolfire02  路  3Comments