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 Dec 11, 2014@Lolmewn
at least tell me which file man lol
Well..... Now ive never done this so if im wrong please say, webstatsx pulls database info in classes.php whilst zac uses various files queries.php and util.php being the primary. Basicly quiring the database and adding the result to a variable, both doing it different ways from what i can see (though this is my first time so...) anyone offer any tips that may help shine a light? Like 'you are so barking up the wrong tree mate' lol
-
View User Profile
-
Send Message
Posted Dec 11, 2014@krustymk
You could compare the queries from Fluid MC Stats to the ones used in WebStatsX ;) I have too limited time on my hands to give detailed example changes, sorry.
-
View User Profile
-
Send Message
Posted Dec 11, 2014@Lolmewn
You might as well have been talking gibberish with that lol, can you give and example ( i learn best that way) such as a old line and a corrected/updated line then where to find the lines? (what it looks like now and an example of what it should look like), or which file i should be looking at? I gather most of it it is about displaying the info rather than gathering it.
Cheers :)
-
View User Profile
-
Send Message
Posted Dec 11, 2014@TNTUP
As for the player wiping, it seems this was fixed in one of the latest DEV-builds. Check out the ticket about it: https://bitbucket.org/Lolmewn/stats/issue/192/new-players-get-stats-wiped-on-re-login
As for web-end for v2.0.0, there's fluid MC stats and some other coming out soon too.
@krustymk
Updating it basically means updating the database schema and modifying the queries (as the new database layout uses per-world data) and stuff.
-
View User Profile
-
Send Message
Posted Dec 10, 2014@krustymk
oh lol I wish if someone updates I would gladly donate :) I don't want to lose 4.6k of uniques players ;) *shame if not, but well*
-
View User Profile
-
Send Message
Posted Dec 10, 2014How much work would it be to update webstatsx? Is it just a case of updateing a file that gets variables from the sql server or is it not allowed due to liscenceing?
or something more? I know bugger all about coding but if its allowed and someone can point me in a direction id give it a go lol
Or how much would someone want to do the work (PM me)
-
View User Profile
-
Send Message
Posted Dec 10, 2014@Lolmewn
aw okay. I guess ill be forced (as soon name changing comes out) using Stats 2.0.0 but I've read comments that it wipe the user upon login amirite? (Although I need to do testings first,
and/or finding a webstats UI or switching to another one (required to start from scratch or if they have a converter)Nvm theyre 1.7.2
EDIT: Theres no WebUI for Stats 2.0.0 that I can find publicly :S
-
View User Profile
-
Send Message
Posted Dec 9, 2014@TNTUP
Pretty sure cynexit is inactive for good. Haven't heard from him in forever...
-
View User Profile
-
Send Message
Posted Dec 8, 2014@Lolmewn
I could request it, but I hopes it would look like WebstatsX, for Zachary, somewhere he said that he stopped working on it.
Is Cynexit still active here and willing to update? I think he would not but well worth asking (wonders if he still check this plugin)
-
View User Profile
-
Send Message
Posted Dec 8, 2014@Lolmewn
Must be something messed up with my copy that just doesn't want to be released as that still gives the null error. In the end I just wrote a simple replacement as all I wanted was kill tracking and auto ranking. I also slipped in a replacement for anti multi-kill to stop pvp alt killing.
I look forward to your new version and will check it out.
-
View User Profile
-
Send Message
Posted Dec 8, 2014@chezpaul2
Oh... In that case, I think you have to change the paths in some apache config? I suppose? I really don't know how that kind of stuff works, I just make the code :') Sorry I can't be of much help here.
@MrBeavis420
Should be "player ID" and "Weapon", so like /stats add pvp 1 5 Fire
I'm going to make stuff like this easier in the future, I'm currently designing an API that will make my life so much easier (and therefore yours too, in extend). It's gonna be awesome, but it's still being built.
-
View User Profile
-
Send Message
Posted Dec 8, 2014@Lolmewn
Yeah, I know it does and it is my bad for not saying before that I have tried passing everything under the sun to it. A players name, their uuid, their database player_id, a weapon name like in the database, a block id, a world name, and multi arg variations such as player block, player world, block player, all the way to player block world.
Wish it worked but it never saves it in the database. Perhaps an example would clear things up.
-
View User Profile
-
Send Message
Posted Dec 7, 2014@Lolmewn
But I never installed the Xampp mysql. Never got it running, never installed as I knew I alreay had one running..
so close yet so far... ;-)
-
View User Profile
-
Send Message
Posted Dec 7, 2014@Jake7902
Looks like sending emails back doesn't add them anymore.
@MrBeavis420
No, since the pvp stat has so-called "parameters". Check the list on the page which ones to give it.
@chezpaul2
Nothing to worry about.
@Jake7902
Pretty sure I fixed that bug in the latest dev-build of Stats, I would grab that if I were you ;)
@chezpaul2
I would suggest to remove the Xampp MySQL stuff, having one MySQL database running on your system is enough. In this case Google is your friend, I have no idea how to achieve this.
-
View User Profile
-
Send Message
Posted Dec 6, 2014@chezpaul2
Okay, I think it might be because xampp is looking for a different location...
XAMPP is looking here.
Socket File
/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
Data Files
/Applications/XAMPP/xamppfiles/var/mysql
Configuration File
/Applications/XAMPP/xamppfiles/etc/my.cnf
But my files are here:
Socket File
/tmp/mysql.sock
Data Files
/usr/local/mysql/data/
Error Log
/usr/local/mysql/data/HOSTNAME.err (insert your hostname)
Base Directory
/usr/local/mysql/ (this is a symbolic link)
Could this be the problem ?
How could I fix it ?
-
View User Profile
-
Send Message
Posted Dec 6, 2014@chezpaul2
Could it be that I used mysql workbench instead of xampp for mysql ?
It's not typing in the info. I triple checked it.. times 5
-
View User Profile
-
Send Message
Posted Dec 6, 2014So I'm almost there... I run check.php and it gives me the green light for everything but for the last one saying Connection to database?No -> No such file or directory Ahhhh!!!. I do have a database running and minecraft does see it as I can access the data in minecraft. What am I missing ?
-
View User Profile
-
Send Message
Posted Dec 5, 2014@MrBeavis420
This fixes the console error, but sadly when a player relogs their stats still get wiped.
-
View User Profile
-
Send Message
Posted Dec 5, 2014@Jake7902
Not sure if it helps you but I get that error too, but I get it when I do the command in my previous comment. I have noticed that the null error survives restarts but if you delete the stats.jar with the server stopped and then put the jar back (no need to remove the stats folder or configuration file so no data loss) , restart the server the null thing actually gets cleared.
Perhaps that might help ya...
-
View User Profile
-
Send Message
Posted Dec 5, 2014Any clue what this means? Using latest version of autorank, vault, stats.
05.12 18:25:23 [Server] INFO Exception happened: Variable length does not match the variable column length - can't update 05.12 18:25:13 [Server] INFO at java.lang.Thread.run(Unknown Source) [?:1.7.0_55] 05.12 18:25:13 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.7.0_55] 05.12 18:25:13 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.7.0_55] 05.12 18:25:13 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) [craftbukkit-dev.jar:git-Bukkit-1.7.2-R0.3-72-g6f592d9-b3083jnks] 05.12 18:25:13 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.scheduler.CraftTask.run(CraftTask.java:53) [craftbukkit-dev.jar:git-Bukkit-1.7.2-R0.3-72-g6f592d9-b3083jnks] 05.12 18:25:13 [Server] INFO at nl.lolmewn.stats.Main$5.run(Main.java:529) [Stats.jar:?] 05.12 18:25:13 [Server] INFO at nl.lolmewn.stats.Main.runTableUpdates(Main.java:380) [Stats.jar:?] 05.12 18:25:13 [Server] INFO at nl.lolmewn.stats.Main.updateStatsInDatabase(Main.java:416) [Stats.jar:?] 05.12 18:25:13 [Server] INFO at nl.lolmewn.stats.api.mysql.StatsTable.updateStat(StatsTable.java:296) [Stats.jar:?] 05.12 18:25:13 [Server] INFO java.lang.IllegalStateException: Variable length does not match the variable column length - can't update 05.12 18:25:13 [Server] ERROR null