Stats by Lolmewn
Stats - made by Lolmewn
Plugin description
Stats is an advanced statistics gathering plugin, currently focused on player statistics. Information such as PVP kills, blocks broken, playtime and much more. You can store this data as simple files, or store them in a MySQL database. The benefit of using the database is that you can also use any web-end out there to display your players' statistics on your website.
Installation instructions
To install the plugin, simply drag-and-drop the Stats.jar into your 'plugins' folder.
When you start the server, a "Stats" folder will be created, containing a config file.
For a detailed description on the config file, click here.
The most important option is "storage", which can be set to either "flatfile" or "mysql" by default.
If you choose MySQL, there is another file (mysql.yml). Fill in your MySQL details there. That's all!
If you're installing a web-end as well, please read the instructions for said web-end on how to install it.
A list of web-ends compatible with Stats 3:
Made one, too? Let me know!
List of available Stats
This is a list of all available stats. Please note that there might be more stats in your environment, as other plugins can add their own stats to the plugin. For those stats, please see the documentation of the plugin providing them.
| Stat name | Description | Available Metadata |
| Arrows | Amount of arrows shot (not hit!) | world |
| Beds entered | Self-explanatory | world |
| Blocks broken | Self-explanatory | world, name, data (see here for more info) |
| Blocks placed | Self-explanatory | world, name, data (see here for more info) |
| Buckets emptied | Self-explanatory | world |
| Buckets filled | Self-explanatory | world |
| Commands done | Amount of commands done | world |
| Damage taken | Self-explanatory | world, cause |
| Death | Amount of times died | world, cause |
| Eggs thrown | Self-explanatory | world |
| Fish caught | Self-explanatory | world |
| Items crafted | Self-explanatory | world, name |
| Items dropped | Self-explanatory | world, name |
| Items picked up | Self-explanatory | world, name |
| Joins | Amount of times joined the server | None |
| Kill | Amount of kills gotten | world, (name of) weapon, entityType |
| Last join | Last time (in milliseconds epoch time) joined the server | world |
| Last seen | Last time (in milliseconds epoch time) left the server | world |
| Money | Not yet functional | world |
| Move | Amount of blocks moved | world, type (0 = walking, 1 = boat, 2 = minecart, 3 = pig, 4 = on a pig in a minecart, 5 = horse, 6 = flying) |
| Omnomnom | Amount of food eaten | world |
| PVP | PVP kills gotten | world, victim (UUID of the other player), time (in milliseconds epoch time), (name of) weapon |
| PVP streak | Current kill-chain, gets reset when killed | world |
| PVP top streak | Highest PVP streak ever achieved - may be moved to Highscores in the future | world |
| Playtime | Time in seconds played on the server | world |
| Shears | Amount of sheeps sheared | world |
| Teleports | Amount of times teleported | world |
| Times kicked | Self-explanatory | world |
| Tools broken | Self-explanatory | world, name |
| Trades | Amount of times traded with a villager | world |
| Votes | Removed since 3.1.1-RC due to incompatibility. If the player name is not found, the vote is ignored | None |
| Words said | Amount of words said | world |
| Times changed world | Self-explanatory | None |
| Xp gained | Amount of XP gained in total | world |
Permissions
Some commands require special permissions to be executed. Here is a list with all permission nodes:
| Node | Default value | Description |
| stats.view | true | Access to /stats |
| stats.view.others | true | Access to /stats <player> |
| stats.custom | op | Gives access to nodes stats.add and stats.create |
| stats.add | op | Access to /stats add |
| stats.create | op | Access to /stats create |
| stats.admin | op | Access to /stats admin |
| stats.reset | op | Gives access to nodes stats.reset.self and stats.reset.others |
| stats.reset.all | op | Access to /stats reset all |
| stats.set | op | Access to /stats set |
| stats.sign.place | op | Can create [Stats] signs |
More info soon
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
-
View User Profile
-
Send Message
Posted Jul 3, 2014@Lolmewn
So it's not my web provider's issue, it's the MySQL database provider's issue, correct? See, they're hosted on two separate providers, and I use my game server's host as a MySQL database provider
I'll see if they can up the max connections.-
View User Profile
-
Send Message
Posted Jul 3, 2014@Malachi21
Looks like there's too many connections to your MySQL database. Either up the max amount of connections it may have or cut some somewhere, I suppose.
-
View User Profile
-
Send Message
Posted Jul 3, 2014Does this support latest spigot builds? I am using the latest dev builds of Stats..
Warning: mysqli::mysqli(): (08004/1040): Too many connections in /home/sablecra/public_html/stats/inc/db.php on line 11
Warning: mysqli::query(): Couldn't fetch mysqli in /home/sablecra/public_html/stats/inc/util.php on line 179
Fatal error: Call to a member function fetch_array() on a non-object in /home/sablecra/public_html/stats/inc/util.php on line 180
I suppose you should take a look on the site to see what's up for yourself and perhaps help me figure out what's wrong
http://www.sablecraftgaming.com/stats/index.php
-
View User Profile
-
Send Message
Posted Jul 3, 2014@Luxaholic
It does that automatically. No need to change anything ;)
-
View User Profile
-
Send Message
Posted Jul 3, 2014so i just updated this a little while back but it works good now but how can i make it so that the current stats being recorded add onto my old stats like the playtime or blocks placed? is it even possible since the new tables are set up differently?
-
View User Profile
-
Send Message
Posted Jul 1, 2014@bobtit
Enter the correct MySQL details.
-
View User Profile
-
Send Message
Posted Jul 1, 2014Please help how can I fix this error [19:57:38] [Server thread/ERROR]: [Stats] Couldn't retrieve connection from pool, erroring [19:57:38] [Server thread/ERROR]: [Stats] MySQL connection failed, disabling plugin!
-
View User Profile
-
Send Message
Posted Jun 30, 2014@GodsDead
Nah, the in-game command stuff is all retrieved from the player-cache. I just have to do it some time in the future :P
-
View User Profile
-
Send Message
Posted Jun 30, 2014@Lolmewn
Superb! It's a bummer because the new web UI dousnt show this information either!
I see your problem, since Move & Blocks are both in a different table from the player table, are you using SQL to query this information into the game-front end? If so then you could pull different type of move data using sql joins for custom stats, I just want to be able to show specific blocks broken, and specific blocks moved (sailed, walked etc).
-
View User Profile
-
Send Message
Posted Jun 30, 2014@GodsDead
Found it, fixed it. It didn't care what was in the "break" column of the database. As for showing specific types of stats, this is currently not yet possible. Planned to add some day.
-
View User Profile
-
Send Message
Posted Jun 29, 2014@Lolmewn
Thank you :D
-
View User Profile
-
Send Message
Posted Jun 29, 2014@Lolmewn
Aha! It must only pull the information when the user re-logs onto the server, I assumed it would just pull the data it needed.
As for the in-game /stats most of my users rely on this information for ranking. to add to this, is it now possible to display specific move information? Like Via boat?
-
View User Profile
-
Send Message
Posted Jun 29, 2014@GodsDead
Must've done something wrong in the command part then. Will fix. Firstjoin doesn't require Essentials as Bukkit itself has a firstjoin timestamp too, which is what I use. It should go to the Stats_players table, not sure why it wouldn't.
@catprowler
No big deal ;) I'll be adding a /stats cleanup command soon that cleans out unused columns and such.
-
View User Profile
-
Send Message
Posted Jun 29, 2014Hi there, I'm new at this whole stats plugin. After I loaded it and set up the config my console keeps telling it found a column in the table that is not being used? http://pastebin.com/vwUy4YRc I have also attached my config file. http://pastebin.com/KnF1v4Bc I took the private info out (password stuff). Just wondering how to fix this. Thank you :D
-
View User Profile
-
Send Message
Posted Jun 28, 2014I finally took the plunge and updated to 2.0.0 and to the horror noticed a giant bug. When a user logs on their /stats show their block break and their block place at exactly the same, every single user. Its setting it to their block place, the in-game stats still increments, but as soon as they log out and in again it updated the breaks to the placed. This does only seem to only be in-game (Thank god) as the web-UI shows them as seperate stats, also the in-game /stats seems to be really off for block break & place.
/Stats shows
Block break: 98190
Block break: 98190
Online UI shows
Blocks Broken 54012 Blocks 4674.38 Blocks
Blocks Placed 45802 Blocks 2883.46 Blocks
config.yml
Another problem, Was that there was no firstjoin for players, This could easily be pulled from Essentails data!
-
View User Profile
-
Send Message
Posted Jun 22, 2014Your link to mcstats.nl points at a parked domain.
-
View User Profile
-
Send Message
Posted Jun 20, 2014@Lolmewn
I noticed one problem that's been bugging me for ages, I have hundreds of players classed as "Online Now!" Which haven't even visited the server in a long time, Is there a way I can fix this? http://stats.piratemc.com/stats2/pages/player-list.php
-
View User Profile
-
Send Message
Posted Jun 19, 2014@GodsDead
Yep. I'll probably implement a /stats remunused command or something to clean up unused columns in a table. You can also choose to re-enable snapshots if you wish.
As for the web-servers, I got plenty of my own ;) Zachary got a ton of domain names too, so that's not going to be any problem! But thanks for the offer, I appreciate it very much.
-
View User Profile
-
Send Message
Posted Jun 19, 2014@Lolmewn
I have a few web-servers I could throw demos up on :)
Right, I took a complete copy of my server onto a local dev server to see how the upgrade process goes and it seems a lot smoother than I would have thought, One thing that I get in my logs is this (I presume because I turned on snapshot features in 1.37)
[20:31:14] [Server thread/INFO]: [Stats] Found a column in table Stats_death that is not used: snapshot_time [20:31:14] [Server thread/INFO]: [Stats] Found a column in table Stats_death that is not used: snapshot_name [20:31:14] [Server thread/INFO]: [Stats] Found a column in table Stats_move that is not used: snapshot_time [20:31:14] [Server thread/INFO]: [Stats] Found a column in table Stats_move that is not used: snapshot_name [20:31:17] [Server thread/INFO]: [Stats] Found a column in table Stats_player that is not used: snapshot_time [20:31:17] [Server thread/INFO]: [Stats] Found a column in table Stats_player that is not used: snapshot_name [20:31:17] [Server thread/INFO]: [Stats] Found a column in table Stats_kill that is not used: snapshot_time [20:31:17] [Server thread/INFO]: [Stats] Found a column in table Stats_kill that is not used: snapshot_name [20:31:23] [Server thread/INFO]: [Stats] Found a column in table Stats_block that is not used: snapshot_time [20:31:23] [Server thread/INFO]: [Stats] Found a column in table Stats_block that is not used: snapshot_name
-
View User Profile
-
Send Message
Posted Jun 17, 2014@GodsDead
Zachary is still getting his servers back up. Once that's done and he finishes the HTML/CSS side of things, I'll throw the PHP at it and *tada*.