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
The error in times only happened to the players that happened to be on when I loaded the plugin. Subtracted off the error, all was good.
@rbos
I haven't found the cause, but for some reason a login time is not initialised.
This causes the function for it to return 0, which turns out to be a bad idea given that it's supposed to return when they logged in/last session check (0 being the unix epoch, roughly 40 years ago :P)
Fixing that, and trying to ensure it will be sane.
This is hopefully the last bug fix I have to do before grapefruit can be tested/released. Look forward to better stat displays (no more seconds if you do /stats stats.playedfor), better commands (explore your stats in game easily), track how long you've been sailing/riding and crafting statistics.
Update: Well crud, someone didn't wire up bukkit correctly so Item crafting never fires the event :( Someone's submitted a bug report and a patch, lets hope it makes it in soon https://bukkit.atlassian.net/browse/BUKKIT-1112
@rbos
BeardStat also stores seconds online, were there any errors in the server log?
I loaded the plugin, importing the old tno-stats database, and /played is giving wildly incorrect results.
Stats stored "seconds online", giving a relatively small number; BeardStat appears to store something entirely different. Here's an example of a player that hasn't logged on yet, and myself.
When I do /played in-game, it says I've played for 2205 weeks.
@S3thc0n
No it doesn't, instead it works with BeardAch. Borth are meant as replacements for stats/achievements, due to flaws/being abandoned when we needed them.
Does this also work with Achievements 2? Because Stats 2 seems to be broken.
Very nice plugin, we just installed it onto our server to record statistics.
Would it be possible to track this information 'per-world' though? or possibly 'per-gamemode'?
That way we can show statistics on our website for things players have done in the survival world, and things they have done in the creative world as 2 seperate sections.
per-world would probably be better, we are planning on having a second special SMP world so would want to seperate the stats for the 2 different SMP worlds out seperately on the website.
@Tehbeard
Awesome, thanks for the great turnaround! The "number of days logged in" stat will be awesome if you can figure it out. The quiet mode will also rock. :)
Had no idea about /stats (derp). An easier way sounds good, like you mentioned.
/stats playerrname page#
Oh my gosh, this is a great replacement for Stats 2.0!
I basically replaced the plugin, and edited the configuration to match the mysql database and my stats work just as expected c:!
Thank you so much!
@Tehbeard Excellent, thank you very much! I was also going to ask that the console spam be turned off with a debug flag or something (the quiet mode quickclay asked about). :)
@quickclay
I'll look into how to add that stat.
Quiet mode? Sure. Coding right now.
in game access? You mean being able to read your/other people's stats? You can do it with /stats at the moment, and grapefruit has interactive mode for /stats that means you don't have to type out a long winded command to read a stat. Another option as well might be /statpages which let you group stats together for quick viewing.
@Tehbeard
Not "total time played" so much as "days joined since intiial join date". For example, each day they play increases this ticker by one.
If the joined Feb 1st, and then logged in 9 different days after that the counter would show 'days logged in: 10", regardless of how long they actually played each day.
It's not automatic promotion, but one of the criteria. "You must have played on our server for at least 2 months without any rules violations to acheive this rank."
I hope that was more clear. Thanks! I've been loving this plugin so far.
Suggestion: maybe a "quiet mode"? It gets kinda spammy with all the "flushing to database, flush completed" messages., and in game access to data would make this amazing!
@Ricowan An option for /laston to message all last online times has been added to grapefruit (next version), you activate it in the config.
Will make calls to /laston print all last online times.
@quickclay
server age as in time spent connected to the server?
the stats.playedfor node tracks the number of seconds they have been connected to the server for, and /played and /playedother player convert this into a human readable format.
For promotion based on playtime, you might like to look at BeardAch which can be configured to trigger an achievement after a certain amount of playtime (using the stats.playedfor statistic BeardStat tracks) and fire rewards (upgrade using a command)
I would love to be able to track a player's "server age" (the total number of days that a player has logged into the server) and have it viewable with /serverage playername or something in game. This would make promotion based on playtime much easier for my mods. Even just tracking the date that they first logged into the server would help. Thanks!
@Tehbeard
Right now I'm just using the default setting, but I can switch it to use the sql backend. Querying the database from my web site would work, no problem... It would be nice to have a command that just dumps the list into chat, but I can work with the database directly if you don't want a chat command for this.
Basically, the Bukkit server I run is whitelisted with only about 8 accounts. I would like anyone to be able to type a single chat command and see the laston data for all players. It doesn't even have to be paged, because most of us use a chat mod on the client side. :)
@Ricowan
are you using the sql backend?
I'm working on cleaning up the web statistics code.
Plan is for 3 options:
Last one should be easy to use to make a list of players who haven't been on in 6 months :)
@Tehbeard
The /laston command will be sweet, thanks! What I'm really hoping for, though, is something that will list all players with a single command. Maybe an "all" option for /laston? :)
@Ricowan
play time is available via /playedother [player]. and /laston [player] will be in the next release.
Is there any way we could get a /laston command that lists the last login date/time for each player on the server? Maybe total played time, too, somewhere. :)