ProtocolLib

3M Downloads

JSON Reading

GamemodeSurvival opened this issue ยท 2 comments

commented

{"extra":[{"text":"[translate]JOIN-MESSAGE[/translate]"}],"text":""}

How would I get [translate]JOIN-MESSAGE[/translate] from this json string above.

commented

you have some json object, you then get the extra element, which is an array of json objects, you then get the first element of that array, and the string you want is the text element of that element.
any json parser will help you.

commented

thanks