pdinklag / MinecraftStats

A Minecraft player statistics browser for the web - supports 1.13 and later!
https://discord.gg/brH5PGG8By
Other
227 stars 53 forks source link

Winner not displaying correctly #175

Closed cunhar closed 2 years ago

cunhar commented 2 years ago

One of my events ended but it is not showing the event winner on the events list page. It only shows Winner: "(nobody)"

https://www.hoobs.live/minecraft/#events

^-- take a loot at the beegone event

pdinklag commented 2 years ago

Yep, that looks wrong. I'll investigate.

cunhar commented 2 years ago

in the render js there is an if statement that looks for e.best and it doesnt seem to exist in the JSON. i wonder if its left over logic

pdinklag commented 2 years ago

in the render js there is an if statement that looks for e.best and it doesnt seem to exist in the JSON. i wonder if its left over logic

Nope, it's not leftover. The error is that for some reason, as you pointed out, it doesn't exist in the JSON. Something is probably wrong in the Python code for finished events.

weihao commented 2 years ago

i am able to reproduce this error.

weihao commented 2 years ago

it is missing best field in the summary

weihao commented 2 years ago

I fixed the issue. Will submit a PR shortly.

weihao commented 2 years ago

Please review: https://github.com/pdinklag/MinecraftStats/pull/189

pdinklag commented 2 years ago

Likely fixed by #195 , would be nice if a third party could confirm this (e.g., @cunhar )?

weihao commented 2 years ago

yeah this is no change to the data files. just a calculation error, so you could just pull the update and let us know if it worked for you

cunhar commented 2 years ago

Likely fixed by #195 , would be nice if a third party could confirm this (e.g., @cunhar )?

I can't confirm what fixed it, but it is working properly now on https://www.hoobs.live/minecraft/index.html#events after I pulled the latest master.

Thank you <3

weihao commented 2 years ago

@cunhar thanks 👍