Stats


Stats - made by Lolmewn


Latest plugin release: HerePlugin issue tracker: Here
Latest plugin beta: Here
Latest Fluid MC Stats: HereWebsite issue tracker: Here
Plugin source: HereWebsite source: 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 & plugin).

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

Different web-ends

Since the plugin simply writes data to a MySQL database, you too can write your own website to display this data! If you make something awesome and want to share it with the rest, just throw me a PM and I'll add it here ;)
NOTE: Please seek support for the web-ends where you downloaded it. This DBO page is mainly for the plugin (although you can also ask your Fluid MC stats questions here).
List of web-ends:

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. You can find it here: http://dev.bukkit.org/server-mods/highscores/

Commands/Permissions

Don't have a permissions plugin? Click here!
CommandPermission-nodeDescription
-stats.trackAll users who have this node will have their stats tracked and uploaded.
-stats.sign.placeAllows users to place [Stats] signs.
-stats.sign.destroyAllows users to break [Stats] signs
/stats-This command shows your stats!
/stats <player>stats.view.othersThis command shows someone else's stats
/stats resetstats.reset.selfThis command resets your statistics
/stats reset <player>stats.reset.otherThis command resets <player>'s stats
/stats resetallstats.resetallThis command resets everyone's stats
/stats create <statName>stats.createCreates a new stat named <statName>. Gets saved to the player table
/stats drop <statName>stats.dropDrops the stat named <statName>. You can't drop stats generated by Stats itself. Those, you can disable in the config.
/stats add <statName> <playerName> <amount> [parameters]stats.addAdd <amount> to stat <statName> using parameters [parameters]. You can usually leave parameters blank. Parameters for all stats can be found below, under column "Variables". If you're adding to yourself, you can leave out <playerName>.
/stats set <statName> <playerName> <amount> [parameters]stats.setSame usage as /stats add, only difference is that this sets the stat to <amount> instead of adding it.

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
FirstjoinTime first joined the server
PVPStreakCurrent PVP streak the player is on. Resets on death
PVPTopStreakHighest gotten PVPStreak value
MoneyAmount of money you have
TradesAmount of times traded with villagers
pvpPVP Statisticskilled (ID of player) weapon

Snapshots

As of Stats v1.30 (using Beta functions), you can now enable snapshots. Set snapshots.enabled to true in the config and it will be working. 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, custom or rightclick.
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).
rightclick signs will display the Stat value of the last player to have rightclicked the sign.

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
Info board
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 - Chat now!

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. If you really really don't want me to get this, then set "sendStatsToGlobalServer" to false in the config. It'll make me sad though :c

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 zachrywilsn zachrywilsn Feb 24, 2015 at 13:53 UTC - 0 likes

    Any Ideas?

    [08:49:38 INFO]: [Traveler] Joshua874 Has Left The Server!
    [08:49:48 INFO]: Exception happened: null
    [08:49:48 ERROR]: null
    java.util.ConcurrentModificationException
    	at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966) ~[?:1.8.0_31]
    	at java.util.LinkedList$ListItr.next(LinkedList.java:888) ~[?:1.8.0_31]
    	at com.google.common.collect.Iterators$9.next(Iterators.java:939) ~[craftbukkit.jar:git-Spigot-d0d1d87-bc03b6f]
    	at com.google.common.collect.Iterators.addAll(Iterators.java:357) ~[craftbukkit.jar:git-Spigot-d0d1d87-bc03b6f]
    	at com.google.common.collect.Lists.newArrayList(Lists.java:147) ~[craftbukkit.jar:git-Spigot-d0d1d87-bc03b6f]
    	at net.minecraft.server.v1_8_R1.UserCache.a(UserCache.java:213) ~[craftbukkit.jar:git-Spigot-d0d1d87-bc03b6f]
    	at net.minecraft.server.v1_8_R1.UserCache.c(UserCache.java:194) ~[craftbukkit.jar:git-Spigot-d0d1d87-bc03b6f]
    	at net.minecraft.server.v1_8_R1.UserCache.getProfile(UserCache.java:123) ~[craftbukkit.jar:git-Spigot-d0d1d87-bc03b6f]
    	at org.bukkit.craftbukkit.v1_8_R1.CraftServer.getOfflinePlayer(CraftServer.java:1290) ~[craftbukkit.jar:git-Spigot-d0d1d87-bc03b6f]
    	at nl.lolmewn.stats.player.UUIDPlayerManager.unloadPlayer(UUIDPlayerManager.java:67) ~[Stats.jar:?]
    	at nl.lolmewn.stats.player.UUIDPlayerManager.unloadPlayer(UUIDPlayerManager.java:200) ~[Stats.jar:?]
    	at nl.lolmewn.stats.Main.updateStatsInDatabase(Main.java:469) ~[Stats.jar:?]
    	at nl.lolmewn.stats.Main.runTableUpdates(Main.java:429) [Stats.jar:?]
    	at nl.lolmewn.stats.Main$5.run(Main.java:578) [Stats.jar:?]
    	at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java:71) [craftbukkit.jar:git-Spigot-d0d1d87-bc03b6f]
    	at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) [craftbukkit.jar:git-Spigot-d0d1d87-bc03b6f]
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_31]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_31]
    	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_31]
    

    [ZachryWilsn]: Server Website: KronicZombies YouTube: ZachryDoesMinecraft

  • Avatar of Lolmewn Lolmewn Feb 24, 2015 at 09:15 UTC - 0 likes

    @Green_Foxxx: Go

    In-game configuration is only the first time Stats is launched without a config. Google around a bit for MySQL, it's very likely you already have it installed. Or ask your hosting company.

    Waiting to see what's going to become of BukkitDev. May or may not switch to a replacement if it completely dies off (which is what I presume to happen really).

  • Avatar of Green_Foxxx Green_Foxxx Feb 24, 2015 at 05:00 UTC - 0 likes

    Hello I am a server owner that needs this plugin. This plugin is needed for AutoRank so that I can track their votes and the plugin will rank them up for that. I am confused on what SQL-Databases are and I need to apparently enter my hosting for that in the config and my user and password. I don't know how to do that stuff and until I do I can't even type on my server because of the setup wizard. I use server hosting so it may be different but all I need from this plugin for right now is for Autorank and I really like your plugin. I hope you can help me so I can use you plugin.

  • Avatar of Lolmewn Lolmewn Feb 22, 2015 at 16:00 UTC - 0 likes

    @antondubek1: Go

    No, and I'd rather not provide one either as a lot of people will be disappointed when I miss it. I'm super busy with uni and work too so don't expect it this week.

  • Avatar of antondubek1 antondubek1 Feb 20, 2015 at 14:26 UTC - 0 likes

    @Lolmewn

    @Lolmewn: Go

    Thanks, have we any rough date as to when to expect stats 3.0?

  • Avatar of Lolmewn Lolmewn Feb 19, 2015 at 20:46 UTC - 0 likes

    @TehMuffinMoo: Go

    Yeah but you'd probably have to do it while the plugin is disabled. Not very sure why it's saving the plugin config on disable, but oh well.

  • Avatar of TehMuffinMoo TehMuffinMoo Feb 19, 2015 at 20:02 UTC - 0 likes

    @Lolmewn: Go

    Thanks for the reply Lolmewn :-)

    I'm not sure, it just doesn't seem to count.. You can see my FluidMC stats page here : www.minecraftmuffin.com/stats

    I'm using version: 2.0.1 running Cauldron 1.7.10 with FTB Unstable. The table is there in MySQL but the values aren't shifting from the default 0.

    Edit - Also, I see in the config there is a #CommandList option, this lists the info that is given when using the /stats command. When I modify this list and do /stats reload it resets the list back to default. Is it possible to add additional stats to be listed?

    Last edited Feb 19, 2015 by TehMuffinMoo
  • Avatar of tito1411 tito1411 Feb 19, 2015 at 14:26 UTC - 0 likes

    @Lolmewn: Go

    Worked perfect. Thanks!!

  • Avatar of Lolmewn Lolmewn Feb 19, 2015 at 11:42 UTC - 0 likes

    @antondubek1: Go

    I think ignoreFlying must be broken then. Pretty sure Stats 3 will have it working though! As for the hostile mobs part, this too will be available in Stats 3. It'll probably look like "Kill type=Zombie|Skeleton|..."

  • Avatar of Lolmewn Lolmewn Feb 19, 2015 at 11:39 UTC - 0 likes

    @TehMuffinMoo: Go

    That's weird, must be a bug. Version? Might already be fixed in 3.0, but that's not stable enough to be used yet.

    @tito1411: Go

    Open up mcmmo.jar with winzip or similar, open plugin.yml, remove the part where it says stats as alias of mcstats.

Facts

Date created
Aug 19, 2012
Categories
Last update
Dec 24, 2014
Development stage
Release
License
GNU General Public License version 3 (GPLv3)
Curse link
Stats
Downloads
208,138
Recent files

Authors

Relationships

Optional dependency
Achievements Reloaded
Highscores
Votifier