BeardStat

BeardStat is statistics tracking plugin for bukkit. It tracks a wide variety of user statistics and makes them available to your playerbase and plugins.
Recorded stats
- last Login and logout time
- Total playtime
- block placement and breaking (including sub/metadata blocks like wool, logs etc)
- Items picked up/dropped
- Damage dealt and recieved
- Kills and deaths
- Food consumed
- Sheep sheared and dyed
- TNT detonated
- Distance travelled on foot/boat/cart/horse/pig
- Items crafted
- Animals tamed
- Teleports
- Fishing
Web interface (under development)
BeardStat also comes with a web interface for stats, this allows players to view their own and friends stats on your servers website. the Web interface also includes a scoreboard system to rank players based on various statistics (playtime, creepers killed)
Commands
Stats are recorded per world, and you can blacklist worlds/gamemodes from tracking. BeardStat also has a number of commands: * /stats - access to all stats information * /played - shows a players playyime. * /laston - Returns the last time the player was on * /statpage - Allows showing a selection of player stats, useful with Bukkit's command aliasing
Dev builds
Development builds of this project can be acquired at the provided continuous integration server.
These builds have not been approved by the BukkitDev staff. Use them at your own risk.
(Please note, zips in dev builds currently contain a broken implementation of the web interface, please instead download the .jar file instead. The web interface available on the right of this page) Development builds fresh from Jenkins
Issues
BeardStat has an issue tracker on github, https://github.com/tehbeard/beardstat/issues.
For error reports please include the following: * full stacktrace of the error * plugin version (inc. build number if using one from CI) * Bukkit version * Database type used (SQLite / MySQL)
Plugin integration
BeardStat provides a rich API for plugin developers to hook into BeardStat and read / record statistics.
For Developers
BeardStat stats are identifiable by a unique Id generated from 4 sub components: * Domain * World * Category * Statistic
Domain is the primary namespace for a collection of stats, the "default" domain is used by BeardStat, I ask that you use your own unique domain for your plugin (i.e. if you make a PvP arena plugin, you could use the domain "pvparena").
World represents the world in which this stat was recorded, these are for the most part the name of the world.
Two special cases exist however. "__global__" is a reserved world name, meant for stats that do not pertain to a world. The second case is "__imported__", this is a reserved world for stats that have been imported from an older version of BeardStat before per world storage was implemented.
While not intended, you can use the world id for a unique area that is not a whole world (Going back to our pvp arena example, you could use the arena names instead, such as old_forge, broken_bow instead of a world name)
Current plugins that are known to integrate BeardStat: * BeardAch - Achievements plugin * SimpleSpleef Evolution
Metrics
BeardStat includes the plugin metrics code developed by Hidendra (author of LWC), which collects anonymous information about the plugins deployment (minecraft, server, plugin version, assumed server location at country level and database type used by BeardStat, aggregated into graph form.) More information on this system, including how to disable it can be found here
-
View User Profile
-
Send Message
Posted Feb 19, 2013@Tehbeard
bummer. Thanks for the response.
-
View User Profile
-
Send Message
Posted Feb 19, 2013@xrnd88
Something messed with the table comment :(
There goes that idea for db versioning
-
View User Profile
-
Send Message
Posted Feb 19, 2013Downgrading to 5 BETA solved my issue.
-
View User Profile
-
Send Message
Posted Feb 19, 2013I installed this last night and everything was working great, today its giving me errors related to SQL. Last night the SQL was fine, stats were being inserted into the DB. Anything I can do here?
2013-02-19 09:32:18 [INFO] [BeardStat] Enabling BeardStat v0.5.1-SNAPSHOT-JAVA6-Ambrosia-git-5e1dd45 2013-02-19 09:32:18 [INFO] [BeardStat] Starting BeardStat 2013-02-19 09:32:18 [INFO] [BeardStat] Loading default language pack 2013-02-19 09:32:18 [INFO] [BeardStat] Connecting to database 2013-02-19 09:32:18 [INFO] [BeardStat] Using mysql Adpater 2013-02-19 09:32:18 [INFO] [BeardStat] Configuring.... 2013-02-19 09:32:18 [INFO] [BeardStat] Connecting.... 2013-02-19 09:32:18 [INFO] [BeardStat] Database version: 1.0.0;InnoDBfree:4096kB 2013-02-19 09:32:18 [SEVERE] Error occurred while enabling BeardStat v0.5.1-SNAPSHOT-JAVA6-Ambrosia-git-5e1dd45 (Is it up to date?) java.lang.NumberFormatException: For input string: "0;InnoDBfree:4096kB" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at me.tehbeard.BeardStat.DataProviders.MysqlStatDataProvider.createConnection(MysqlStatDataProvider.java:127) at me.tehbeard.BeardStat.DataProviders.MysqlStatDataProvider.<init>(MysqlStatDataProvider.java:68) at me.tehbeard.BeardStat.BeardStat.getProvider(BeardStat.java:388) at me.tehbeard.BeardStat.BeardStat.onEnable(BeardStat.java:152) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.loadPlugin(CraftServer.java:282) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.enablePlugins(CraftServer.java:264) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.reload(CraftServer.java:596) at org.bukkit.Bukkit.reload(Bukkit.java:184) at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchCommand(CraftServer.java:514) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchServerCommand(CraftServer.java:506) at net.minecraft.server.v1_4_R1.DedicatedServer.al(DedicatedServer.java:260) at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:225) at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494) at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427) at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
When I deleted the database and let beardstats make it new without changing any config I didnt get any errors: 2013-02-19 09:44:06 [INFO] [BeardStat] Enabling BeardStat v0.5.1-SNAPSHOT-JAVA6-Ambrosia-git-5e1dd45 2013-02-19 09:44:06 [INFO] [BeardStat] Starting BeardStat 2013-02-19 09:44:06 [INFO] [BeardStat] Loading default language pack 2013-02-19 09:44:06 [INFO] [BeardStat] Connecting to database 2013-02-19 09:44:06 [INFO] [BeardStat] Using mysql Adpater 2013-02-19 09:44:06 [INFO] [BeardStat] Configuring.... 2013-02-19 09:44:06 [INFO] [BeardStat] Connecting.... 2013-02-19 09:44:06 [INFO] [BeardStat] Checking for table 2013-02-19 09:44:06 [INFO] [BeardStat] Stats table not found, creating table 2013-02-19 09:44:06 [INFO] [BeardStat] created table 2013-02-19 09:44:06 [INFO] [BeardStat] [DEBUG] Preparing statements 2013-02-19 09:44:06 [INFO] [BeardStat] [DEBUG] Player stat statement created 2013-02-19 09:44:06 [INFO] [BeardStat] [DEBUG] Set player stat statement created 2013-02-19 09:44:06 [INFO] [BeardStat] Initaised MySQL Data Provider. 2013-02-19 09:44:06 [INFO] [BeardStat] initializing composite stats 2013-02-19 09:44:06 [INFO] [BeardStat] Registering events and collectors 2013-02-19 09:44:06 [INFO] [BeardStat] Loading commands 2013-02-19 09:44:06 [INFO] Parsing option 0 2013-02-19 09:44:06 [INFO] Parsing option 1 2013-02-19 09:44:06 [INFO] Parsing option 2 2013-02-19 09:44:06 [INFO] [BeardStat] BeardStat Loaded
Any ideas?
-
View User Profile
-
Send Message
Posted Feb 18, 2013@Tehbeard
Thank you kindly!
-
View User Profile
-
Send Message
Posted Feb 14, 2013@Heddiw
Will look into it today
-
View User Profile
-
Send Message
Posted Feb 12, 2013Hey Tehbeard,
0.5.1 appears to have solved the crazy errors, however this permission is now ignored:
stat.command.played
And the only way players can see their own /played is with this permission:
stat.command.played.other
Problem with giving them that permission is that it causes a severe error everytime they /played someone who is offline.
-
View User Profile
-
Send Message
Posted Feb 11, 2013@Tehbeard
Installed this morning, will let you know how it turns out!
-
View User Profile
-
Send Message
Posted Feb 10, 2013@Heddiw
Try 0.5.1?
-
View User Profile
-
Send Message
Posted Feb 9, 2013@Heddiw
hmm, no.
Any error messages from beardstat?
-
View User Profile
-
Send Message
Posted Feb 9, 2013Using BeardStat 0.5 with SQLite, quite a busy server, no problems except one user who had some pretty high stats and played time... Their played time reset and a counter I use also reset; any ideas why?
-
View User Profile
-
Send Message
Posted Feb 8, 2013@sethgandy
I'll try knock the reconnect messages to be debug mode only.
-
View User Profile
-
Send Message
Posted Feb 8, 2013@Tehbeard
Every two minutes. I host the mySQL db on godaddy, externally.
-
View User Profile
-
Send Message
Posted Feb 8, 2013@sethgandy
hmm, is this spam every 2-3 minutes? That'd be indicative of the SQL server dropping the connection between each save (BeardStat tries to maintain the connection to speed up loads/saves).
-
View User Profile
-
Send Message
Posted Feb 7, 2013Is there anyway to set the intervals of when beardstat reports connections? Like my whole console is spammed with: [INFO] [BeardStat] Initaised MySQL Data Provider. [INFO] [BeardStat] Configuring.... [INFO] [BeardStat] Connecting.... Like report if there was any failures in the last 10 minutes or something. Like: [INFO] [BeardStat] 30 Success, 0 Failures
-
View User Profile
-
Send Message
Posted Feb 3, 2013Yes good news !
I'm trying the last 0.5.1 and for me it seems running as well as the previous 0.5 (on java 7). The 'lastlogin' issue was fixed and now i'll just just wait for the language support... :)
-
View User Profile
-
Send Message
Posted Feb 2, 2013Possible good news everyone.
I have ported the library that was built against Java 7 to Java 6 (which means BeardStat should now be once again Java 6 compatible), I have a few more bugs to squash then I'm releasing 0.5.1 for public beta testing. I don't recommend running it in production as it has some half finished features (language pack support being the main one), but if you can test it on Java 6 systems and report back any bugs, I'd be very greatful :)
-
View User Profile
-
Send Message
Posted Feb 1, 2013Ok, implemented the fix but build server is broken, will fix that tomorrow and test.
For those that care to know, the problem was that the sql statement for getting the stats closes any open result sets, which is what the stats come back from the DB in. Now at low loads, this doesn't cause any issues.
But if one of the loading threads was cut off before it finished, it would kill the result set it was working on, causing the errors.
The fix is to have a dedicated worker thread that the loads are passed to, they execute sequentially and without pausing the game loop.
-
View User Profile
-
Send Message
Posted Feb 1, 2013@Chemical_Datas
Another bug in the database layer :(
Going to try and fix this, hope to have 0.5.1 out this weekend
-
View User Profile
-
Send Message
Posted Feb 1, 2013Beard Stat 5.0 Occurs on start up and then gives these errors every few seconds
2013-02-01 11:38:17 [SEVERE] [BeardStat] ========================================= 2013-02-01 11:38:17 [SEVERE] [BeardStat] DATABASE ERROR 2013-02-01 11:38:17 [SEVERE] [BeardStat] ========================================= 2013-02-01 11:38:17 [SEVERE] [BeardStat] An error occured while trying to connect to the BeardStat database 2013-02-01 11:38:17 [SEVERE] [BeardStat] Mysql error code: 0 2013-02-01 11:38:17 [SEVERE] [BeardStat] Error code not found, either check the error code online, or post on the dev.bukkit.org/server-mods/beardstat page 2013-02-01 11:38:17 [SEVERE] [BeardStat] ========================================= 2013-02-01 11:38:17 [SEVERE] [BeardStat] Begin error dump 2013-02-01 11:38:17 [SEVERE] [BeardStat] ========================================= 2013-02-01 11:38:17 [SEVERE] java.sql.SQLException: Operation not allowed after ResultSet closed 2013-02-01 11:38:17 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) 2013-02-01 11:38:17 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987) 2013-02-01 11:38:17 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982) 2013-02-01 11:38:17 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) 2013-02-01 11:38:17 [SEVERE] at com.mysql.jdbc.ResultSetImpl.checkClosed(ResultSetImpl.java:794) 2013-02-01 11:38:17 [SEVERE] at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:838) 2013-02-01 11:38:17 [SEVERE] at com.mysql.jdbc.ResultSetImpl.getInt(ResultSetImpl.java:2672) 2013-02-01 11:38:17 [SEVERE] at me.tehbeard.BeardStat.DataProviders.MysqlStatDataProvider$1.run(MysqlStatDataProvider.java:218) 2013-02-01 11:38:17 [SEVERE] at java.lang.Thread.run(Unknown Source) 2013-02-01 11:38:17 [SEVERE] [BeardStat] ========================================= 2013-02-01 11:38:17 [SEVERE] [BeardStat] End error dump 2013-02-01 11:38:17 [SEVERE] [BeardStat] ========================================= 2013-02-01 11:38:17 [SEVERE] Error executing resolve callback with Deferred: {RESOVLED,null} java.lang.NullPointerException at me.tehbeard.BeardStat.listeners.DelegateIncrement.invoke(DelegateIncrement.java:29) at me.tehbeard.BeardStat.listeners.DelegateIncrement.invoke(DelegateIncrement.java:7) at net.dragonzone.promise.Deferred.run(Deferred.java:487) at net.dragonzone.promise.Deferred.doCallbacks(Deferred.java:228) at net.dragonzone.promise.Deferred.resolve(Deferred.java:453) at me.tehbeard.BeardStat.DataProviders.MysqlStatDataProvider$1.run(MysqlStatDataProvider.