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 Jun 8, 2014@Lolmewn
yes! running the SQL DELETE FROM Stats_player WHERE world='world2' put everything back into place. So as I stand, I cant add new worlds. If anyone teleports to this world, will it re-add the rows?
Maybe its time for me to update stats from 1.3.7, Im just happy none of the stats were lost! I rely to heavily on your plugin to issue my ranks automatically! :)
-
View User Profile
-
Send Message
Posted Jun 8, 2014@GodsDead
I was actually going for a system where there just wouldn't be a row if the player doesn't have permissions in that world, but I'm not sure if the data-saver actually knows that.
I'll be doing some work on this in a minute, expect a dev-build out this evening.
-
View User Profile
-
Send Message
Posted Jun 8, 2014@Lolmewn
Ah! I already deleted the columns and they regenerated :S I only did it on me though.. How does stats "check" for new worlds? I hope deleting he world2 will fix the issue, does the server have to be offline for this to work?
Well, can I please suggest a world based config? I mean, if there wasn't a problem displaying playtime It makes sense to have stats for every world, but in the event that I dont want a world tracked, its difficult!
-
View User Profile
-
Send Message
Posted Jun 8, 2014@GodsDead
Yes, deleting the empty columns will fix it. You can use "DELETE FROM Stats_player WHERE world='world2'" to delete all columns with the wrong world. Same for all other tables, just change Stats_player to Stats_block/kill/move/death. I'm not sure why it is being displayed wrong in-game, I'm going to have to figure that out.
As for configuration, currently there is none. It just takes all worlds.
-
View User Profile
-
Send Message
Posted Jun 8, 2014@Lolmewn
Nope. The creation of this new world has messed up the playtime display stats system, Nobody but me has teleported to world2, it was only used for 5 mins max.
At present players play for x amount of time, and the playtime shows as that time, then either after a restart of if they leave/come back, its reset to 0 again.
Does the plugin think people are in world2 because the lastleave is 0000-00-00 00:00:00?
Not only has this new world2 mysql row taken priority over the default world for playtime (even though the playtime data is still getting saved in the right row) This world2 has been defaulted to the main stats page for a user http://stats.piratemc.com/single_player.php?p=GodsDead that was working fine until this world creation.
I know this panel is very old, but It has worked flawlessly until added this new world, Im very frustrated.
If I delete the world will it fix the problem? Is there a way to blacklist worlds from stats? how does stats read which worlds to add? I don't see any world specific configuration?
-
View User Profile
-
Send Message
Posted Jun 7, 2014@GodsDead
Looks like it currently does this:
Player x in world 1 wants to see player y's stats, who is in world 2. The plugin will look up data for world 1 for player y and show it to player x, since he is in world 1.
I'm probably going to make the command world-independant again and add a /stats world <world> [player] command. Sound good? :)
-
View User Profile
-
Send Message
Posted Jun 7, 2014Using 1.37, Installed Multiverse and created a new world for testing, Nobody can access this world apart from me, but Now when anyone joins a new mysql row is created for this world name for them and their playtime in /stats is showing an new empty playtime, so its counting up from when they joined that day.
I have the phpmyadmin open, and everything seems to be tracking into the right worlds, Just not displaying correctly in /stats commandList:- Playtime.
I have noticed that lastjoin on this new world is of the recent timestamp 2014-06-07 14:46:13 and its lastleave is 0000-00-00 00:00:00, but I disabled multiverse and have only visited that world once, and not today.
-
View User Profile
-
Send Message
Posted Jun 6, 2014@LHammonds
Gotta update my Highscores plugin. It creates highscores at the start of the plugin and never again, so newly created stats won't be seen until a server restart.
-
View User Profile
-
Send Message
Posted Jun 5, 2014It seems I am having inheritance issues. It did not parse my permissions correctly (acted like I did not have perms) but when I added the perm node directly to my ID, it worked like you said. Now I need to troubleshoot why PEX had issues with the inheritance. (FYI - I have "owner" group attached to me which inherits an owner sub-group which inherits the stats group)
EDIT: How do I tie-in the custom stat with Highscores plugin? I type "/highscores top parkournether" and it says "Highscore with name parkournether not found!"
Thanks,
LHammonds
-
View User Profile
-
Send Message
Posted Jun 4, 2014@LHammonds
No message at all? I look at the code and it should *always* send a message. Either no perms, stat already exists or stat created. I just tried it out myself, seems to be working.
What did I find though was that a permissions issue results in an empty line (apparently there's no "No permission message" O.o). If you're getting an empty line, that's the issue. Permission node seems to be stats.create
-
View User Profile
-
Send Message
Posted Jun 4, 2014@ursak
And why continue to feed the trolls keeping them alive? That stupid comment wasn't even worthy of a single reply...except for the author asking for clarification.
@Lolmewn, I finally upgraded my server to 1.7.9, dropped all stat tables, installed Stats 2.0.0 and started up the server. Things looked to load and re-create just fine. So I added the new permission nodes for the custom fields and then tried to add a new field but it seemed to do nothing (no error message in Minecraft nor the console) Example: /stats create parkournether
Assuming it might have worked, I tried "/stats add parkournether HammondsLegacy 1" but said "Stat not found!" which confirmed that the field creation didn't work.
The database user that stats is using has full access to the database, every permission except grant so it shouldn't be a database permission issue to create new fields (especially since the plugin was able to re-create the tables and fields just fine during initialization).
Any ideas on what I should look at to get good trouble-shooting info? Should I create the field manually and test the other commands? If so, what SQL command should I use?
Environment
Thanks,
LHammonds
-
View User Profile
-
Send Message
Posted May 28, 2014@LHammonds
I can try that, thanks much!
-
View User Profile
-
Send Message
Posted May 22, 2014@AngelopoulosfilmsYT
Wow. This plugin has become so popular that it's starting to get the attention from trolls :D
-
View User Profile
-
Send Message
Posted May 22, 2014@Jhwx
Have you set PermissionsEx backend to write to the same SQL database that Stats is living on? If so, you can modify your query to link the two tables on UUID to get your PEX info.
LHammonds
-
View User Profile
-
Send Message
Posted May 21, 2014Is there any way to link this to PermissionsEx to display a users rank on a profile page, or something similar? Thanks!
-
View User Profile
-
Send Message
Posted May 19, 2014@Cajogos
Changelogs can be found in the file description :)
-
View User Profile
-
Send Message
Posted May 19, 2014@Lolmewn
Hey lolmewn!
My bad, I am using the previous version. I presume those permission won't actually work for the 1.3.7 version then? I tried looking for a changelog as I actually did think about that after reading some comments, but didn't find one.
Sorry for the bother!
Thanks for the quick help and the great plugin. :)
-
View User Profile
-
Send Message
Posted May 18, 2014@DanSpedey
Your web server cannot connect to the database. Make sure you are using a user that has remote access to the database and make sure you are not getting blocked by a firewall anywhere. If the problem persist, please contact your hosting provider for information regarding remote connections to MySQL.
-
View User Profile
-
Send Message
Posted May 18, 2014@DanSpedey
But your webserver isn't, so you must've misconfigured it somewhere.
-
View User Profile
-
Send Message
Posted May 18, 2014@Lolmewn
My mc server connects to the database fine