Closed Pomdre closed 6 years ago
The MOTD returned by the server is the json format.
But how can I get it and look like this?
Use plugin
Then I can not use that in my program
What do you mean?
I am createing a server list website
and I need clean motd without extra
Those MOTDs are returned by the server. If it is in json format, you may have to write your own judgment and then connect the strings together.
Why is this extra stuff coming?
http://mc-status-api.gearhostpreview.com/json.php?host=90.149.222.18&port=25565
Raw json:
{ "status": "Online", "motd": { "ingame": { "extra": [ { "color": "yellow", "bold": true, "text": "Dag" }, { "color": "yellow", "bold": true, "text": " " }, { "color": "green", "bold": true, "text": "& " }, { "color": "blue", "bold": true, "text": "Natt" }, { "color": "white", "text": " En offisiell server for " }, { "color": "dark_green", "text": "Level Up Community" }, { "color": "white", "text": "." } ], "text": "" }, "clean": { "extra": [ { "color": "yellow", "bold": true, "text": "Dag" }, { "color": "yellow", "bold": true, "text": " " }, { "color": "green", "bold": true, "text": "& " }, { "color": "blue", "bold": true, "text": "Natt" }, { "color": "white", "text": " En offisiell server for " }, { "color": "dark_green", "text": "Level Up Community" }, { "color": "white", "text": "." } ], "text": "" }, "html": { "extra": [ { "color": "yellow", "bold": true, "text": "Dag" }, { "color": "yellow", "bold": true, "text": " " }, { "color": "green", "bold": true, "text": "& " }, { "color": "blue", "bold": true, "text": "Natt" }, { "color": "white", "text": " En offisiell server for " }, { "color": "dark_green", "text": "Level Up Community" }, { "color": "white", "text": "." } ], "text": "" } }, "host": { "host": "90.149.222.18", "port": "25565" }, "players": { "max": 250, "online": 3 }, "version": { "version": "1.8.x-1.13.x", "protocol": 393 }, "queryinfo": { "agreement": "Ping", "processed": "0.5063" } }