mojira.dev
MC-48969

Tellraw crashes if clickEvent is an URL without "http://"

When using the command

/tellraw @a {text:"Link",color:green,clickEvent:{action:open_url,value:"google.com"}}

the game crashes. But does not crash with

/tellraw @a {text:"test",color:blue,clickEvent:{action:open_url,value:"http://google.com"}}

Attachments

Comments 18

Confirmed:
Steps to reproduce:

  • Enter

    /tellraw @a {text:"Link",color:green,clickEvent:{action:open_url,value:"google.com"}}
  • Click Link

Description: Updating screen events

java.lang.NullPointerException: Updating screen events
	at bft.a(SourceFile:171)
	at bgv.d(SourceFile:242)
	at bft.d(SourceFile:136)
	at bgv.k(SourceFile:219)
	at bdp.p(SourceFile:1377)
	at bdp.ah(SourceFile:791)
	at bdp.f(SourceFile:745)

Still an issue in 08a

Still an issue in 10c

check this one out, tested out... and worked for me!

/tellraw @a {text:"test",color:blue,clickEvent:{action:open_url,value:"http://google.com"}}
8 more comments

@unknown, you're too late for the show. This issue was fixed yesterday...

Still not fixed completely!

Confirmed for:

  • 1.8.3

Error message 1.8.3

[14:20:25] [Client thread/ERROR]: Can't open url for ClickEvent{action=OPEN_URL, value='google.com'}
java.net.URISyntaxException: Missing protocol: google.com
	at axv.a(SourceFile:294) [1.8.3.jar:?]
	at aww.a(SourceFile:127) [1.8.3.jar:?]
	at axv.k(SourceFile:413) [1.8.3.jar:?]
	at aww.k(SourceFile:105) [1.8.3.jar:?]
	at axv.p(SourceFile:390) [1.8.3.jar:?]
	at avf.s(SourceFile:1497) [1.8.3.jar:?]
	at avf.av(SourceFile:888) [1.8.3.jar:?]
	at avf.a(SourceFile:325) [1.8.3.jar:?]
	at net.minecraft.client.main.Main.main(SourceFile:124) [1.8.3.jar:?]

java.net.URISyntaxException: Missing protocol: google.com

This is not a crash. The URL handler simply doesn't know to handle that URL without a scheme.

Isn't it by default or very often http://?

Yes.In a browser's adressbar.But if you treat chat chat line this way.That would be interpreted as following:

Yes.In a browser's adressbar.But if you treat chat chat line this way.That would be interpreted as following:

user-2a4c8

Erik Broes

Confirmed

Minecraft 14w07a, Minecraft 14w08a, Minecraft 14w10c, Minecraft 1.7.9, Minecraft 14w17a, ..., Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 1.8.2-pre2, Minecraft 1.8.2-pre3, Minecraft 1.8.2-pre4

Minecraft 14w26c, Minecraft 1.8.2-pre5

Retrieved