I'm new to Nightbot and coding in general, I'm wondering if there's a way to have Nightbot pull player stats from my Minecraft server - I can access the JSON file with all the stats in my server files, I'm looking for a way to set up a command, for example, !deathcount, to parse the file for "minecraft:deaths" and print the result as something like "WightTaleDear has died 170 times this seed."
Ideally I'd want to do this for other stats as well, like "Death By Beetle" -> "minecraft:killed_by":"druidcraft:beetle"-> "WTD has Died to a Beetle 12 times" or ""quark:frog" -> WTD has Never Been Killed by a Frog
Minecraft - player stats
3 replies
Hey @Pale Snake!
Sorry, but we don't give tutorials on how to write code here.
You'll need your JSON file to be accessible through a URL, the $(urlfetch) and $(eval) Nightbot variables, and you'll need to know how to navigate through a JSON file.
If you write some code, but have a hard time to make it work, then we might be able to help, if you share your code first, of course. If the JSON file is on a URL that require a private key to access it, please censor it and give us an example of the architecture of the file instead, same thing if the JSON contains sensible information.