
/ar leaderboard displaying incorrect playernames
TheLecturer opened this issue ยท 21 comments
Versions
[13:20:11] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-1459 (MC: 1.7.9) (Implementing API version 1.7.9-R0.1-SNAPSHOT)
[13:20:11] [Server thread/INFO]: [Vault] Loading Vault v1.2.31-b411
[13:20:12] [Server thread/INFO]: [Autorank] Loading Autorank v3.1-Dev-216
When I run "/ar leaderboard" (as player in game or on console) :
- The times displayed look correct (as validated against the mySQL database).
- However the playername displayed is incorrect in all cases - the names displayed have never even connected to my server, ever.
Example.
My top player (as per Autorank mysql db) -
uuid : ca7821ce-fc49-4a03-9084-7587f281f199
time : 59476
Actual player name : Sparta_217, as confirmed at http://connorlinfoot.com/uuid/
The UUID, ca7821ce-fc49-4a03-9084-7587f281f199 Belongs to the user: Sparta_217
Output (1st line) of "/ar leaderboard" -
>ar leaderboard
[13:52:02 INFO]: -------- Autorank Leaderboard --------
[13:52:02 INFO]: 1 | MinecraftNoob789 - 41 day(s), 7 hour(s) and 17 minute(s).
59476 = 41 days 7 hours 17 mins (give or take). So to me it looks like it is pulling the correct row from the database, but something is going wrong when it is looking up the uuid and fetching the playername....?
Same website gives the following for "MinecraftNoob789" -
Username: MinecraftNoob789 UUID: da439aca66f64a7e9b1f45a1fe117464
Thanks.
I don't know why it is doing this.
Autorank is using Mojang servers to find the matching player names.
Do you have the uuid 'da439aca66f64a7e9b1f45a1fe117464' in the data.yml somewhere?
Yes it appears I do -
da439aca-66f6-4a7e-9b1f-45a1fe117464: 16
Did a closer inspection (with my glasses on this time) and yes, this is a player that has connected to my server before - apologies for that red herring!
They also exist in the autorank sql table with a time of 15, which tallies.
So not the Mojang uuid lookup then. Something to do with when the leaderboard data is constructed...?
Okay, the development server is building a new #217 version at the moment. Try that one!
ar leaderboard from the console -
[14:54:05] [Server thread/WARN]: Unexpected exception while parsing console command "ar leaderboard"
org.bukkit.command.CommandException: Unhandled exception executing command 'ar' in plugin Autorank v3.1-Dev-217
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-1459]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) ~[spigot.jar:git-Spigot-1459]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:722) ~[spigot.jar:git-Spigot-1459]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchServerCommand(CraftServer.java:709) [spigot.jar:git-Spigot-1459]
at net.minecraft.server.v1_7_R3.DedicatedServer.aB(DedicatedServer.java:319) [spigot.jar:git-Spigot-1459]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:284) [spigot.jar:git-Spigot-1459]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576) [spigot.jar:git-Spigot-1459]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482) [spigot.jar:git-Spigot-1459]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1459]
Caused by: java.lang.NullPointerException
at me.armar.plugins.autorank.leaderboard.Leaderboard.sendLeaderboard(Leaderboard.java:77) ~[?:?]
at me.armar.plugins.autorank.commands.LeaderboardCommand.onCommand(LeaderboardCommand.java:26) ~[?:?]
at me.armar.plugins.autorank.commands.manager.CommandsManager.onCommand(CommandsManager.java:115) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-1459]
... 8 more
The 1st time you use the command it should be slow, because it has to initialise. All the times after that, it will be instant.
Huzzah. This data looks correct.
You're not kidding about the first run being slow....
>ar leaderboard
[15:57:59 INFO]: -------- Autorank Leaderboard --------
[15:57:59 INFO]: 1 | Sparta_217 - 41 day(s), 7 hour(s) and 17 minute(s).
[15:57:59 INFO]: 2 | Dad1157 - 29 day(s), 15 hour(s) and 57 minute(s).
[15:57:59 INFO]: 3 | TheLecturer - 24 day(s), 8 hour(s) and 26 minute(s).
[15:57:59 INFO]: 4 | Skylaar03 - 23 day(s), 3 hour(s) and 25 minute(s).
[15:57:59 INFO]: 5 | Enninsies - 20 day(s), 11 hour(s) and 12 minute(s).
[15:57:59 INFO]: ------------------------------------
Okay, please try #218
Sorry....
[15:19:23] [Server thread/WARN]: Unexpected exception while parsing console command "ar leaderboard"
org.bukkit.command.CommandException: Unhandled exception executing command 'ar' in plugin Autorank v3.1-Dev-218
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-1459]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) ~[spigot.jar:git-Spigot-1459]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:722) ~[spigot.jar:git-Spigot-1459]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchServerCommand(CraftServer.java:709) [spigot.jar:git-Spigot-1459]
at net.minecraft.server.v1_7_R3.DedicatedServer.aB(DedicatedServer.java:319) [spigot.jar:git-Spigot-1459]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:284) [spigot.jar:git-Spigot-1459]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576) [spigot.jar:git-Spigot-1459]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482) [spigot.jar:git-Spigot-1459]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1459]
Caused by: java.lang.NullPointerException
at me.armar.plugins.autorank.leaderboard.Leaderboard.sendLeaderboard(Leaderboard.java:78) ~[?:?]
at me.armar.plugins.autorank.commands.LeaderboardCommand.onCommand(LeaderboardCommand.java:26) ~[?:?]
at me.armar.plugins.autorank.commands.manager.CommandsManager.onCommand(CommandsManager.java:115) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-1459]
... 8 more
There are no errors at startup.
That happens when I type "/ar leaderboard" at the console.
I've been working on improving the update time for you. Good news: The leaderboard uses at most 2 seconds for 5 guys instead of millions of seconds ;)
You can use #220 if you want to.