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 Apr 3, 2013Hello lolmewn! ;) I want to compliment you by the job you did with 1.15!
I just rebooted my server, with 1.15 and the performance is so much better!!!! ;)
What I did:
- Reboot the server, make a timings report right away ;)
- Reboot the server, and wait 2 minutes get a timings report; )
- Relogged 5 times, and made a timings report!
Result:
0.00% 0.02% 0.003 s 0.0118 ms 0.26k 0.00% Task: interval 20
0.00% 0.65% 0.001 s 0.324 ms 0.00k 0.00% PlayerQuitEvent
0.00% 0.52% 0.001 s 0.2583 ms 0.01k 0.00% PlayerJoinEvent
0.00% 0.72% 0.001 s 0.3597 ms 0.00k 0.00% PlayerMoveEvent
0.00% 0.02% 0.001 s 0.0085 ms 0.06k 0.00% EntityDamageEvent (and others)
-
View User Profile
-
Send Message
Posted Apr 3, 2013@Lolmewn
Lolmewn, that sounds pretty amazing! ;) I love these things you just said, I will try that. thanks for telling me, I hope you are right, I will ask some people however what it might be.
Thanks anyway! Oh and, if you have a link to the 1.15 version I would love to see that, also I can get you some dev to help you out perhaps!
-
View User Profile
-
Send Message
Posted Apr 3, 2013Stats v1.15 is in queue, updating the main page with new sexy stuff
-
View User Profile
-
Send Message
Posted Apr 3, 2013@Lolmewn
Okay, thank you!
-
View User Profile
-
Send Message
Posted Apr 3, 2013@UnitedFactions
That error is so weird, I have absolutely no clue what's causing it. Try redownloading?
Also, I'm pushing data every 10 seconds because the website updates every 10 seconds too. I could of course just change that (which I might end up doing), but we'll see.
I added a MySQL connection pool to the plugin, allowing for better MySQL connectivity.
The time taken on log-in and log-out should be reduced dramatically in 1.15 too.
I'm going to rewrite part of the plugin soon, so that it caches all data and updates that to the database instead of having a big list with things to update.
Donations always make me happy :P
-
View User Profile
-
Send Message
Posted Apr 3, 2013@UnitedFactions
Suggestion:
- Only push the stats to the database every 5 minutes, the database doesn't have to be realtime ;)
- Take a look into how mcMMO does the mysql handling, they save all the stats about everything in mysql, and it is fairly faster and more efficient then this atm.
Another few suggestions from people I spoke on bukkitdev:
<Lyneira> If you're just recording stats, that seems like it would be possible to offload the db connection to a separate worker thread that handles database insertions
Last but not least:
If you are able to implent performance fixes / performance optimalisation, then I might be willing to donate ;) performance is very important for big servers.
Thanks!
-
View User Profile
-
Send Message
Posted Apr 3, 2013@Lolmewn
Well, it might be weird but certainly not funny =/
It lags the server at start, and I just got another:
2013-04-03 20:09:47 | [SEVERE] Exception in thread "Craft Scheduler Thread - 1"
2013-04-03 20:09:47 | [SEVERE] org.apache.commons.lang.UnhandledException Plugin Stats vjenkins-Stats-197 generated an exception while executing task 28
2013-04-03 20:09:47 | [???] at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
2013-04-03 20:09:47 | [???] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2013-04-03 20:09:47 | [???] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2013-04-03 20:09:47 | [???] at java.lang.Thread.run(Thread.java:722)
2013-04-03 20:09:47 | [???] Caused by: java.lang.Error Unresolved compilation problem:
2013-04-03 20:09:47 | [???] Type mismatch: cannot convert from element type Object to String
2013-04-03 20:09:47 | [???]
2013-04-03 20:09:47 | [???] at nl.lolmewn.stats.Main.runPlayTimeTableUpdate(Main.java:507)
2013-04-03 20:09:47 | [???] at nl.lolmewn.stats.Main.runTableUpdates(Main.java:465)
2013-04-03 20:09:47 | [???] at nl.lolmewn.stats.Main.access$1(Main.java:456)
2013-04-03 20:09:47 | [???] at nl.lolmewn.stats.Main$2.run(Main.java:123)
2013-04-03 20:09:47 | [???] at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftTask.run(CraftTask.java:67)
2013-04-03 20:09:47 | [???] at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
2013-04-03 20:09:47 | [???] ... 3 more
2013-04-03 20:09:47 | [???]
At start:
0.04% 77.11% 0.077 s 38.556 ms 0.00k 2.78% PlayerJoinEvent
0.02% 102.42% 0.051 s 51.2099 ms 0.00k 2.78% PlayerQuitEvent
0.00% 0.03% 0.008 s 0.0156 ms 0.53k 0.00% PlayerMoveEvent
0.00% 0.02% 0.000 s 0.0099 ms 0.03k 0.00% Task: interval 120
0.00% 0.07% 0.000 s 0.033 ms 0.01k 0.00% PlayerCommandPreprocessEvent
-
View User Profile
-
Send Message
Posted Apr 3, 2013@ha11oga11o
The second error should be fixed in 1.15 (which isn't even out yet, so I guess you ment 1.14), the first one too I think.
@Lubenica998
Thanks for the feedback :) Achievements are planned, but are a hell of a lot of work to do currently (Since I have to rewrite part of the plugin if I want to do that).
The other suggestion will be in 1.15!
-
View User Profile
-
Send Message
Posted Apr 3, 2013just FYI seems i encounter new error, could help you with v1.15:
http://pastebin.com/RMLyA393
Cheers!
-
View User Profile
-
Send Message
Posted Apr 3, 2013Hello Lolmewn, I have a big server (80 slots), and i am giving my players rank Member when they reach 40 hours of playing time on server (I am using GroupManager). So every time I must do /manuadd <player> Member. So, I know it's hard to make that but it will be super awesome if you could make something like achievments... So in config you can create achievement "Member" and set the given group... (GroupManager!) Another suggestion - Command /stats is cool. My players are using it a lot! So it will be awesome if you could create command /stats <player> so only admins with some permission could see other player stats! I know it's hard to make a plugin, but these are only suggestions. My players love your plugin very much and it is an essential plugin for my server because we are giving Member, Member+ and Member ranks with help of your plugin. So it will be easier with achievements.. It will be more automatics. Sorry for my bad english, and yes - thank you a lot for this awesome plugin! Regards! :)
EDIT: Other suggestion: Make in config the abbility to choose if you want to count playing time while you are AFK!
-
View User Profile
-
Send Message
Posted Apr 3, 2013@UnitedFactions
That's... a weird error you got there.
@UnitedFactions
It'll be fixed in 1.15 :)
-
View User Profile
-
Send Message
Posted Apr 3, 2013@Lolmewn
I am having the same issues as Steven2282 as i told you earlier this month.
Please fix the alter_table issue =/
-
View User Profile
-
Send Message
Posted Apr 3, 2013Got this after a reboot:
2013-04-03 12:24:55 | [SEVERE] Exception in thread "Craft Scheduler Thread - 5"
2013-04-03 12:24:55 | [SEVERE] org.apache.commons.lang.UnhandledException Plugin Stats vjenkins-Stats-197 generated an exception while executing task 28
2013-04-03 12:24:55 | [???] at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
2013-04-03 12:24:55 | [???] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2013-04-03 12:24:55 | [???] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2013-04-03 12:24:55 | [???] at java.lang.Thread.run(Thread.java:722)
2013-04-03 12:24:55 | [???] Caused by: java.lang.Error Unresolved compilation problem:
2013-04-03 12:24:55 | [???] Type mismatch: cannot convert from element type Object to String
2013-04-03 12:24:55 | [???]
2013-04-03 12:24:55 | [???] at nl.lolmewn.stats.Main.runPlayTimeTableUpdate(Main.java:507)
2013-04-03 12:24:55 | [???] at nl.lolmewn.stats.Main.runTableUpdates(Main.java:465)
2013-04-03 12:24:55 | [???] at nl.lolmewn.stats.Main.access$1(Main.java:456)
2013-04-03 12:24:55 | [???] at nl.lolmewn.stats.Main$2.run(Main.java:123)
2013-04-03 12:24:55 | [???] at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftTask.run(CraftTask.java:67)
2013-04-03 12:24:55 | [???] at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
2013-04-03 12:24:55 | [???] ... 3 more
2013-04-03 12:24:55 | [???]
-
View User Profile
-
Send Message
Posted Apr 3, 2013@About7Deaths
Possibly, I'd have to rewrite some stuff though. Since the data is currently not cached.
-
View User Profile
-
Send Message
Posted Apr 2, 2013@Lolmewn
Could you code an updated plugin like this? http://dev.bukkit.org/server-mods/tno-achievements/?page=2 It would be very cool, thanks! :D
-
View User Profile
-
Send Message
Posted Apr 2, 2013Update 1.15 coming soon, bringing you signs!
-
View User Profile
-
Send Message
Posted Apr 2, 2013@Bakurawr
Currently not. It is considered, just haven't had time to add it yet.
-
View User Profile
-
Send Message
Posted Apr 2, 2013Out of curiosity, is there settings to choose what that should be logged or not? If no, is that something that could be considered?
-
View User Profile
-
Send Message
Posted Apr 2, 2013@Steven2282
Hmm, idk. Try updating anyway?
-
View User Profile
-
Send Message
Posted Apr 1, 2013@Lolmewn
MySQL 5.0