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 Feb 8, 2014@Lolmewn
Ah. Didn't know that. Great to know. :)
I have one other question. When I try to make signs it says it need to get the info from the database and then nothing happens. Why? :P
-
View User Profile
-
Send Message
Posted Feb 8, 2014I dont do Wordpress. All my stuff is custom made for the application.
Also LolMewn. I suggest adding an article to your php that when you search through players, it only searches <main_snapshot> that way you dont end up seeing multiples.
-
View User Profile
-
Send Message
Posted Feb 8, 2014@SentinelCraft
I would also be interested in the PHP, You should look into making a wordpress plugin!
And to Lolmewn, a request to add-in variables to use in /info /motd /rules along with basic math, so people could use "You need to break 1203 more blocks to reach rank".
-
View User Profile
-
Send Message
Posted Feb 8, 2014Hey. Can you add in stats info about world where are player (end, nether,world), player group VIP,ADMIN and others? Maybe even hunger and health bar. It would be amazing
-
View User Profile
-
Send Message
Posted Feb 7, 2014I want to display my stat info on my enjin website but i do not know how to add it to enijn.
-
View User Profile
-
Send Message
Posted Feb 7, 2014@SentinelCraft
Ah yes. Setting it to -1 will probably result in it being instantly removed. I guess you can just set it to some humongously large number :)
@ursak
Check out https://bitbucket.org/Lolmewn/stats/issue/127/stats-mcmmo - it also contains the fix for that.
-
View User Profile
-
Send Message
Posted Feb 7, 2014This must have been asked before. But is there a way to change the /stats command so it doesn't conflict with McMMO?
-
View User Profile
-
Send Message
Posted Feb 7, 2014Okay Thanks, If this yields anything useful I will make sure to send you the PHP stuff. Im planning on creating a type of monthly trending type stats so you can see total blocks broken per month, ect ect.
Ahh, Wanted to ask one small favor. Can you add something that will disable the time to live function. I plan on keeping my stats trends forever
-
View User Profile
-
Send Message
Posted Feb 6, 2014@SentinelCraft
That's the intended use, yeah :)
@Stennersaurus
You just need to have one and throw your connection parameters in the config.
@GodsDead
I don't know about auto-rank, but Achievements hooks into all stats that exist, even custom ones by plugins (this is because it iterates over all stats, not over a known set of stats). Or at least, it will when Stats 2.0 comes out with Achievements 2.0.
-
View User Profile
-
Send Message
Posted Feb 6, 2014Yes I got it working, I think there was a problem with my hosts mysql node, setup an external mysql database and webstatsx using the older version R: Stats v1.37 for 1.7.4 Oct 29, 2013, lets see after a restart if data now sticks.
Which would be the better plugin to manage auto-ranking? Achievements or auto-rannk? Which one can hook into most stats? Im going to mesure some stats like: FirstRank: 10000 Blocks Broken 1000 Blocks sailed in a boat 24 hours online time.
-
View User Profile
-
Send Message
Posted Feb 6, 2014How on do I install this? Its says something about a MySQL database, but it doesn't explain how to use one with stats. I'm confused.
-
View User Profile
-
Send Message
Posted Feb 6, 2014Gotcha. So I could just make a monthly snapshot and then each month use a PHP script to subtract the last month from the current month so we can see the stats for the past month.
Is that about what it can do?
-
View User Profile
-
Send Message
Posted Feb 5, 2014@SentinelCraft
Basically what it does is take a "snapshot" of the values that are in the database at that very moment. The plugin will just keep adding to the "main_snaphot", basically the main counter for all stats. Multiple snapshots can be in the database, which could allow you to view who has the most blocks broken in the timeframe between two snapshots, for example.
I hope this makes it a bit clearer :)
-
View User Profile
-
Send Message
Posted Feb 4, 2014Hey. Love your stats plugin. have had it running for about 3 months now so I have a good solid base to view. Its great.
I was actually wondering. This snapshot feature, How does it work? The description to me is slightly ambiguous, but that honestly could just be the way I am reading it.
In my mind, the snapshot is a way to take a certain amount of time X and record some or all stats for that. Is that how it works?
I ask because this is a feature I was planning on writing a script for myself if I had to, basically a new DB every month that all stats got recorded into. I really do not want to reinvent the wheel if I do not have to though.
Keep up the good work! I have made some modifications to the web end because certain stats were not there that players wanted to see. IE total block breaks for those who were not on the top 10. If they ever become presentable I will share them with you. Its kinda messy how I did it.
-
View User Profile
-
Send Message
Posted Feb 4, 2014If people want to see the progress of the development of the new web-end, you can subscribe to repository updates here: https://bitbucket.org/AccountProductions/fluid-mc-stats
The latest version of the website with a 1.38 backed server is available for preview here: http://lolmewn.nl/mcstatsphp/ - any suggestions are welcome in the form of tickets and/or Pull Requests.
-
View User Profile
-
Send Message
Posted Feb 3, 2014@LHammonds
As for custom stats, in theory it's possible. Would be awesome if you could make a ticket for it so I can keep track of what I have to do :)
As for renaming some stats, I think I'll change the wrong name (catched for example) in the next version (new webend will of course be compatible).
-
View User Profile
-
Send Message
Posted Feb 2, 2014Is there any way we can have custom fields and use commands to populate them? And then have highscores read them?
For example, I use ServerSigns to reward people when they reach the end of a parkour course. It would be nice if I could also increment a custom field when they complete the course...which highscores can then track and show who has completed the various courses the most.
A command such as /stats increment {CustomField} {player}
Example:
/stats increment NetherParkour HammondsLegacy
To store this custom field, I'd imagine the best place is "Stats_player" and using a few commands to manage it.
/stats create {CustomField} /stats drop {CustomField}
If in-game commands to manage table structure are not practical, I'd be OK directly manipulating the database table.
------Is there a way to change the text of existing stats such as "fish catched" to "fish caught?"
Thanks,
LHammonds
-
View User Profile
-
Send Message
Posted Feb 2, 2014@scimmia17
How about user permissions for the web-end? That kind of stuff? Correct prefix in the PHP config?
@Tunix2
Enable PHP short tags.
-
View User Profile
-
Send Message
Posted Feb 2, 2014@niftyapple
Get my Highscores plugin, it does exactly that.
-
View User Profile
-
Send Message
Posted Feb 2, 2014Feature req: Signs for top ranking player in each category.
[stats] PlayTime TOP
would result in something like
[stats] 15d 3h 2m 50s Top Play Time Niftyapple
Something like that