Stats


Stats - made by Lolmewn


Latest plugin release: HerePlugin issue tracker: Here
Latest plugin beta: Here
Latest web-end: HereWebsite issue tracker: Here

What does this plugin do?

This plugin provides you with a server-end plugin and a website-end set of files. It writes data collected through events to a MySQL database (plugin), and reads and displays that to users (website).

How do I install this?

It's really simple! Download the plugin, and drag the jar to the 'plugins' folder of your server.
Start your server, you don't have to worry about any settings file! When you join the server (You either have to be OP or have the permission-node 'stats.config'), the automatic configurator will start. This will guide you through the configuration of the plugin from in-game!
The website is also simple to install. You can check out the forum thread for detailed instructions.
And that's all! Now you can let the plugin worry about the rest ;)
Please remember to edit your server name in server.properties, as this will be sent to the global server to track your data with

Extra functionality

Achievements

There now is a side-plugin which allows you to create Achievements. You can find it here: http://dev.bukkit.org/server-mods/lolmewnachievements/

Highscores

A new plugin allowing you to track highscores with a configurable time basis. You can find it here: http://dev.bukkit.org/server-mods/highscores/

Commands/Permissions

Don't have a permissions plugin? Click here!

stats.track - All users who have this node will have their stats tracked and uploaded.
stats.sign.place - Allows users to place [Stats] signs.
stats.sign.destroy - Allows users to break [Stats] signs.
/stats - This command shows your stats! No permission node.
/stats <player> - This command shows someone else's stats. Permission node: stats.view.others
/stats reset - This command resets your statistics. Permission node: stats.reset.self
/stats reset <player> - This command resets <player>'s stats. Permission node: stats.reset.other

What does this plugin log?

This plugin logs all actions to a MySQL database. So, you might ask, what does it log?

StatDescriptionVariables
Block breakAll broken blocks with their DatavaluesitemId itemData breaking
Block placeAll placed blocks with their DatavaluesitemId itemData breaking
DeathAll deaths with their causescause entity(boolean, true is safest)
KillAll kills with their causestype
MoveWalking, sailing, riding a train, on the back of a pig or by horse.type (0=walk, 1=boat, 2=train, 3=pig, 4=pig in train, 5=horse)
PlaytimeTime played in seconds
ArrowsArrows shot
Xp gainedTotal XP gained
JoinsTotal times joined
Fish catchedTotal fish Caught (Yes, I know it's caught.)
Damage takenTotal damage taken
Times kickedTotal times kicked
Tools brokenTotal Tools broken
Eggs thrownTotal eggs thrown
Items craftedTotal items crafted
OmnomnomTotal times had a snack
On fireTotal times being on fire
Words saidTotal words said
Commands doneTotal commands done
VotesTotal times voted for the server (uses Votifier)
WorldchangeTotal times worlds changed
BucketfillTotal buckets filled
BucketemptyTotal buckets emptied
BedenterTotal times bed entered
ItemdropsTotal times items dropped
ItempickupsTotal times items picked up
TeleportsTotal times teleported
ShearTotal times sheared
LastjoinThe time the player joined the server last
LastleaveThe time the player left the server last

As of Stats v1.30 (using Beta functions), you can now enable per-world support. Just set useBetaFunctions to true in the config and you're all set. If you're coming from an old version, it will set all already collected stats to the main world (world 0).

Snapshots

As of Stats v1.30 (using Beta functions), you can now enable snapshots. Just set useBetaFunctions to true in the config and you're all set. Explanation of the config:

KeyDefault valueDescription
enabledtrueEnables or disables the creation of Snapshots
timeToLive1WAfter a certain amount of time, old snapshots get deleted if their name is 'auto_generated snapshot'. A list of what you can use:
  • m = Minute
  • h = Hour
  • d = Day
  • W = Week
  • M = Month
  • Y = Year
interval1DThe interval at which to take a snapshot. Note that taking snapshots is done off the main thread, and shouldn't affect performance.
previousThe timestamp at which the previous snapshot was taken. Do not change this.

Disabling certain stats

You can, as of v1.26, disable stats you want in the config. You can disable any stat, just put the statname in the list. You can find all statnames up on this page.

Signs

As of 1.15, Stats now supports signs showing statistics in-game. The layout of a sign must be the following when placing it:

SignDataType can be any Stat there is. Even custom ones provided by other plugins! Check the big table above and use the Stats' name on the sign.

SignType can be either player, global or custom.
If you use player on line 3, the name of the player of which you want his stats to display must be on line 4.
Global will take the total amount of that specific stat. Custom signs will ask you to say an SQL query. If you don't know what this is, you probably shouldn't use it. If the query succeeds, you are asked to say some text that will end up on line 2 and 3 of the sign. This can be 30 characters max (15 per line).

Global Stats

http://mcstats.nl/
Proudly sponsored by
Intreppid

Development 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, they may or may not work at all.
Development builds for Stats can be found at my CI, over at http://ci.centrility.nl/job/Stats/.

MCStats plugin stats

How many servers use this plugin? How many players have the benefits of this plugin?
You can see all that here: http://mcstats.org/plugin/Stats
Statistics of the global server

Stats API and dev portal

There's a small API for the plugin where you can get some data.
Here you can see how to use it.

Plugins using Stats

Achievements
Highscores
PlayGridMc
AutoRank
Configurable messages
Does your plugin hook into Stats, but is it not in the list? Send me a PM!

IRC Support

You can find me (and possibly, when I'm around, support) in my IRC channel #Lolmewn on irc.esper.net - See you there!

Tutorial

Global statistics server disclaimer

You might be wondering what the global server is tracking. Here is a list of what it logs:

  • Your server name, specified in server.properties
  • Your server port, specified in server.properties
  • All queries the plugin has sent to the local MySQL server.

What would I need your server name and port for? This is to keep track of the different servers out there. There are servers where multiple servers run on one box (same IP), with the same name, the only thing different is the port it's running on. I need it to tell the difference between both servers.

Metrics

This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:

  • A unique identifier
  • The server's version of Java
  • Whether the server is in offline or online mode
  • The plugin's version
  • The server's version
  • The OS version/name and architecture
  • The core count for the CPU
  • The number of players online
  • The Metrics version

If you wish to disable this feature (/me cries), you can do so by opt-ing out, which you can do in the config file under /plugins/PluginMetrics/

Auto-updater

This plugin has a built-in auto-updater, which connects to BukkitDev to check for updates. If you, for some reason, wish to disable this process, you can do so by setting 'update' to false in the plugins' settings file.

Donations

If you feel like giving something back to me, you can donate to me. All income from donations will be spent on coffee or similar.
I'm accepting donations through:

  • Bitcoins on address 1QC19kut8nuMJNAsMZ3QneKuW2a8f5QgQG
  • Dogecoins on address DKN8Lrm4KfC7Jh9M2KopjPkwcRfA7Ak3zj
  • Paypal, either via email lolmewn(at)gmail.com or via this link

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of TheCoolGuy123_5_Minecraft_ TheCoolGuy123_5_Minecraft_ Apr 17, 2014 at 00:09 UTC - 0 likes

    People cant chat with this plugin enabled. (if they join)

    JACK

  • Avatar of Lolmewn Lolmewn Apr 15, 2014 at 17:23 UTC - 0 likes

    @sinder33: Go

    I just don't make any difference between blocks, I just throw the ID in the database. Pretty sure you just misconfigured AutoRank or something. You can also check the database and see manually if the records for redstone ore are there.

    Priorities list: Stats, Achievements, Highscores, Skillz, Sortal, rest.

  • Avatar of sinder33 sinder33 Apr 15, 2014 at 17:15 UTC - 0 likes

    @Lolmewn: Go

    Since Then the other ores wouldn't work.

    Stats log block broken. Autorank use the Data inside Block broken.

  • Avatar of Lolmewn Lolmewn Apr 15, 2014 at 15:04 UTC - 0 likes

    @sinder33: Go

    Why do you think this is a Stats issue, and not an Autorank issue?

    @AngryMan69: Go

    Check your logs.

  • Avatar of AngryMan69 AngryMan69 Apr 15, 2014 at 13:39 UTC - 0 likes

    ok i downloaded plug and i started server but i don't get anything from stats plugin ...

  • Avatar of sinder33 sinder33 Apr 14, 2014 at 22:33 UTC - 0 likes

    I got problems with broken blocks logging

    I am using your plugin with Autorank.

    He got 1400 redstone blocks mined (100% sure)

    When he do /ar check (Checking goals to reach next rank it don't stand [Done]) The broken blocks are logged using your plugin.

    Gold ore, Lapis ore, Emerald ore and Diamond ore is fine

    Last edited Apr 14, 2014 by sinder33
  • Avatar of Lolmewn Lolmewn Apr 14, 2014 at 09:21 UTC - 0 likes

    @TNTUP: Go

    I'm already done ;) Latest dev-build contains UUID changes. It just adds the UUID to the database if there is none yet.

    NOTE: This build also contains the new stats 'pvptopstreak' and 'pvpstreak' and a whole new 'pvp' table.

    Last edited Apr 14, 2014 by Lolmewn
  • Avatar of TNTUP TNTUP Apr 14, 2014 at 03:40 UTC - 0 likes

    @Lolmewn: Go

    Um, I hope those UUID will work on 1.7.5 and/or 1.7.6/7/8. I hope you'll keep updating that plugin and I hope it wont require a database wipe.

    BFAK:95066,dd3bd97af6e0c8de224582d02370f079170eea468d01c5afc6a4b2b0119a2840

  • Avatar of Lolmewn Lolmewn Apr 12, 2014 at 20:22 UTC - 0 likes

    @SentinelCraft: Go

    Interesting. I'm probably gonna have to check if I don't release database connections somewhere.

    EDIT: Yup, found one. On player load. Latest dev-builds have the fix but are still being tested

    Last edited Apr 13, 2014 by Lolmewn
  • Avatar of SentinelCraft SentinelCraft Apr 11, 2014 at 16:13 UTC - 0 likes

    Might have a small issue. My stats database is getting rather large. As my player base keeps growing. I am having issues with too many connections. Is there a way to throttle that down?

Facts

Date created
Aug 19, 2012
Categories
Last update
Apr 15, 2014
Development stage
Release
License
GNU General Public License version 3 (GPLv3)
Curse link
Stats
Downloads
163,929
Recent files

Authors

Relationships

Optional dependency
Achievements Reloaded
Highscores
Votifier