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
@Bl0c
Block, not too sure whats causing the number issues, looking into it. As for the stacktrace, I'll tweak the code to try and prevent that.
@KDMinecraftServer
You are using the sqlite driver (file based as opposed to using a mysql server), is this intentional? there's no support for the webui with a sqlite database.
The plugin seems to be having trouble connecting to the database for some reason... pastebin.com/6GrDpnrm
Also the web UI doesn't show names for the stats and the scoreboard doesn't show anything. kdms.us/stats
I don't know if it makes a difference, but I have had older versions of BeardStat in the past.
Web UI: The scoreboards are way, way off, I updated my "fixed version of config/scoreboards.json can be found on the repository here: https://raw.github.com/tehbeard/BeardStat/hotfix/src/web%202.0/config/scoreboards.json "
But that didn't do anything, If I search for a user it shows there true play time 2 Weeks, 3 Days, 20 Hours, 42 Minutes, 28 Seconds, the scoreboard shows playtime as 16 Minutes, 8 Seconds???
http://pastebin.com/VhpiQ3WK
I think Chat not work http://les-casques-jaunes.craft-web.com/stats/scoreboards.php?board=chat And WTF ? :p http://les-casques-jaunes.craft-web.com/stats/scoreboards.php?board=kd
A fixed version of config/scoreboards.json can be found on the repository here: https://raw.github.com/tehbeard/BeardStat/hotfix/src/web%202.0/config/scoreboards.json
Will be running a few tests tomorrow on the installer to check the connection validator works, and will push that out as the download for 0.6.2.
@Bl0c
I think I know the bug with the scoreboards, will link a patches file later today.
I'm this http://pastebin.com/UgrwyMne In the website, the name are here, is good ! But few are writing boat name as "boat", is normal ? The stats work, is great ! Just Scoreboards has a bug
@Bl0c
Hmm, OK. Try this. Locate the plugins config.yml (plugins/beardstat/config.yml) And there should be a line in there starting with mcver:
Delete that line, don't leave it a blank line either. When the server next goes up it should force a tee run of the metadata script to populate the human readable names.
If not, I'll grab the script out for you to run from console.
I also plan to modify the web installer to run a db check when configuring it. Should fix a few issues :-)
Exact concern had "stat" instead of "stats" ... sorry men The names of the statistics are not displayed in the player profiles (still under construction)? And scorboard not working http://les-casques-jaunes.craft-web.com/stats/
Otherwise, it's really a great job! congratulation
@Bl0c
Check the database and table prefix are correct?
ty but now i'm this error: http://pastebin.com/CFShpAeP
@Bl0c
Try replacing that file with this one from the repo: https://github.com/tehbeard/BeardStat/blob/develop/src/web%202.0/api/sql.php
It should print the error that made sql not return a result object.
I'm this error after installation : Fatal error: Call to a member function fetch_assoc() on a non-object in /home/lescasqu/public_html/stat/api/sql.php on line 13
player.class.php, for me 42 - but i added lines so its probably not correct # anymore
@rasnyderiii
give me the line no and I can correct it in the repo :)
appear to have a hardcoded line:
$bs_db->real_query("SELECT `name` FROM `stats_entity` WHERE `name`='$this->name'");
I changed that to my prefix and it works...
@rasnyderiii
O_o weird, no code on that line, just a string for the SQL statement.
Found a call to that function further down, but the line above should stop that happening.
If you're feeling up to it, could you try this modification, see if it makes the error check code catch this quirk.
Look for the file api/player.class.php, around line 74 look for this:
Swap
if (!$res) {
for this
if ($res === false) {
Everything appears setup correct, db is visable in mysql, no errors in console.. but I get:
Fatal error: Call to a member function fetch_assoc() on a non-object in /api/player.class.php on line 53
Any thoughts? (all latest updates / dev / cb )