Autorank 3.5.1 and Statistics v.1.2.4: Stats can't be retrieven
NightDragon1 opened this issue · 12 comments
I use Statistics v.1.2.4 and the current version of autorank. Somehow autorank doesn't connect to statistics proplery... while it tells at startup it has...
-------- boot log ----
01:57:28 INFO]: [Autorank] Enabling Autorank v3.5.1
[01:57:28 INFO]: [Autorank] Simple config file loaded
[01:57:28 INFO]: [Autorank] Advanced config file loaded
[01:57:28 INFO]: [Autorank] Settings config file loaded
01:57:29 INFO: [Autorank] Loaded stored uuids.
01:57:29 INFO: [Autorank] Loaded playerdata.
01:57:29 INFO: [Autorank] Successfully established connection to localhost:3306
01:57:29 INFO: [Autorank] ---------------[Autorank Dependencies]---------------
01:57:29 INFO: [Autorank] Searching dependencies...
01:57:29 INFO: [Autorank] Essentials has been found and can be used!
01:57:29 INFO: [Autorank] OnTime has not been found!
01:57:29 INFO: [Autorank] Stats has not been found!
01:57:29 INFO: [Autorank] Vault has been found and can be used!
01:57:29 INFO: [Autorank] Factions has not been found!
01:57:29 INFO: [Autorank] Statistics has been found and can be used!
01:57:29 INFO: [Autorank] AfkTerminator has not been found!
01:57:29 INFO: [Autorank] WorldGuard has been found and can be used!
01:57:29 INFO: [Autorank] mcMMO has not been found!
01:57:29 INFO: [Autorank] RoyalCommands has not been found!
01:57:29 INFO: [Autorank] UltimateCore has not been found!
01:57:29 INFO: [Autorank] Searching stats plugin...
01:57:29 INFO: [Autorank] Found Stats plugin: Statistics (by bitWolfy)
01:57:29 INFO: [Autorank] Hooked into Statistics (by bitWolfy)
01:57:29 INFO: [Autorank] ---------------[Autorank Dependencies]---------------
01:57:29 INFO: [Autorank] Loaded libraries and dependencies
01:57:29 INFO: [Autorank] Interval check every 5 minutes.
01:57:29 INFO: [Autorank] Data file loaded
01:57:29 INFO: [Autorank] Language file loaded (lang.yml)
01:57:29 INFO: [Autorank] Using timings of: stats
01:57:29 INFO: [Autorank] Autorank 3.5.1 has been enabled!
-------- end boot log -------------------
The following outpur shows the issue:
[01:59:13 INFO]: n: §cPVP Kills value: 26
[01:59:13 INFO]: n: §cPVE Kills value: 948
[01:59:13 INFO]: n: §9Traveled (km) value: 836
[01:59:13 INFO]: n: §6Broken value: 76415
[01:59:13 INFO]: n: §6Placed value: 35890
[01:59:13 INFO]: n: §aOnline (hours) value: 5460
[01:59:13 INFO]: n: §aPlaytime (hrs) value: 125
[01:59:13 INFO]: n: §cDeaths value: 17
[01:59:13 INFO]: n: §cPVP Kills value: 0
[01:59:13 INFO]: n: §cPVE Kills value: 445
[01:59:13 INFO]: n: §9Traveled (km) value: 709
[01:59:13 WARN]: Unexpected exception while parsing console command "ar syncstats"
org.bukkit.command.CommandException: Unhandled exception executing command 'ar' in plugin Autorank v3.5.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.8.3-R0.1-SNAPSHOT.jar:git-Spigot-2ec6f06-7722428]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.8.3-R0.1-SNAPSHOT.jar:git-Spigot-2ec6f06-7722428]
at org.bukkit.craftbukkit.v1_8_R2.CraftServer.dispatchCommand(CraftServer.java:646) ~[spigot-1.8.3-R0.1-SNAPSHOT.jar:git-Spigot-2ec6f06-7722428]
at org.bukkit.craftbukkit.v1_8_R2.CraftServer.dispatchServerCommand(CraftServer.java:632) [spigot-1.8.3-R0.1-SNAPSHOT.jar:git-Spigot-2ec6f06-7722428]
at net.minecraft.server.v1_8_R2.DedicatedServer.aN(DedicatedServer.java:405) [spigot-1.8.3-R0.1-SNAPSHOT.jar:git-Spigot-2ec6f06-7722428]
at net.minecraft.server.v1_8_R2.DedicatedServer.A(DedicatedServer.java:369) [spigot-1.8.3-R0.1-SNAPSHOT.jar:git-Spigot-2ec6f06-7722428]
at net.minecraft.server.v1_8_R2.MinecraftServer.z(MinecraftServer.java:651) [spigot-1.8.3-R0.1-SNAPSHOT.jar:git-Spigot-2ec6f06-7722428]
at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:554) [spigot-1.8.3-R0.1-SNAPSHOT.jar:git-Spigot-2ec6f06-7722428]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
Caused by: java.lang.NullPointerException
at com.wolvencraft.yasp.db.totals.PlayerTotals.fetchData(PlayerTotals.java:79) ~[?:?]
at com.wolvencraft.yasp.db.totals.PlayerTotals.(PlayerTotals.java:64) ~[?:?]
at com.wolvencraft.yasp.session.OfflineSession.(OfflineSession.java:58) ~[?:?]
at com.wolvencraft.yasp.util.cache.OfflineSessionCache.fetch(OfflineSessionCache.java:71) ~[?:?]
at com.wolvencraft.yasp.StatisticsAPI.getSession(StatisticsAPI.java:74) ~[?:?]
at me.armar.plugins.autorank.hooks.statisticsapi.StatisticsAPIHandler.getNormalStat(StatisticsAPIHandler.java:255) ~[?:?]
at me.armar.plugins.autorank.statsmanager.handlers.StatisticsHandler.getNormalStat(StatisticsHandler.java:119) ~[?:?]
at me.armar.plugins.autorank.commands.SyncStatsCommand.onCommand(SyncStatsCommand.java:46) ~[?:?]
at me.armar.plugins.autorank.commands.manager.CommandsManager.onCommand(CommandsManager.java:130) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.8.3-R0.1-SNAPSHOT.jar:git-Spigot-2ec6f06-7722428]
... 8 more
so it seems it can't get the stats properly...
I should've mentioned that Statistics is not working properly with Autorank yet.
I've spoken to the author of Statistics, but their API is not yet finished to work with other plugins.
Ah so it's an API issue on the Statistics side? Okay got it.
Is there a chance for an workaround? Hm maybe i should adap Statistics for myself to make it work...
Yes, this is an issue with Statistics's API. It's really hard for you as a third-party developer to create an API for them. They will have to manually do that themselves unfortunately. In the mean time, you can use Stats (by lolmewn). You might be able to write a converter from Statistics to Stats.
Well.. what about using the data from the database directly, instead of using the Java API? All you need to know is the database settings which are stored in the statistics config.yml ...
Of course an stable API would be the best to prove an abstracted access layer, but in meanwhile... ;)
I've thought about it, but it doesn't look like a very good idea to me. Such a raw implementation is bound to break fairly quickly. I would rather wait for them to release their own API. Besides, if they never build an API, it definitely means something about their inner-structure and third-party plugin compatibility.
What plugin can i use to get the Autorank plugin to count the amount of mobs killed when using the command /ar track
Staarvin when i have the mobs requirement it doesnt register the players pregress