GloriousAlpaca Posted June 8, 2019 Posted June 8, 2019 Hello, how can I access player statistics on a server (for example the death count) ? On the Minecraft Wiki they say the stats are stored in a json:https://minecraft.gamepedia.com/Statistics#Storage Do I need to parse the values saved there or are there methods I can use ? Thank you for your help! Quote
GloriousAlpaca Posted June 8, 2019 Author Posted June 8, 2019 I think I have found it! I'll try it and then write how to do it. Quote
GloriousAlpaca Posted June 8, 2019 Author Posted June 8, 2019 How can I access the StatisticsManager ? It has a method called readStat that has no player parameter, so I assume I can somehow get an object that corresponds to a specific player. How can I do that ? Quote
GloriousAlpaca Posted June 8, 2019 Author Posted June 8, 2019 On 6/8/2019 at 3:29 PM, diesieben07 said: EntityPlayerMP#getStatFile. Expand Thank you ! Quote
GloriousAlpaca Posted June 8, 2019 Author Posted June 8, 2019 For anybody reading this, it worked by doing this: int c = ((EntityPlayerMP) entity).getStatFile().readStat(StatList.DEATHS) 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.