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 May 2, 2014I am currently working on all of our servers here at AccountProductions, there is no ETA so, the avatars no loading, shortened links, and the demo are currently down. I am working very hard to get them back up fairly fast. Sorry for any inconveniences this may cause.
-
View User Profile
-
Send Message
Posted May 2, 2014@UnDrac
I see.
Setting it to run at time x is practically the same, you just have to change the previousSnapshot time to match the time you want.
AFK hasn't been implemented yet, although there is a config option for it. Still gotta figure out how to hook into Essentials.
Are you saying /stats reload doesn't work? If so, that's a bug and should be reported accordingly.
As for snapshots, the idea was to be able to measure the difference between two snapshots and generate highscores based on those values.
-
View User Profile
-
Send Message
Posted May 2, 2014@Lolmewn
Forgot to mention snapshots currently work this way:
What I'm trying to achieve is this:
The snapshots could be anything like a separate MYSQL table or a flatfile. You could still keep snapshots in the same table if that's simpler.
And if possible a way to do this other than of on a fixed period? It'd be better to have it on a date/time rather than every "x" amount of time. Like say 00:00 AM 1st of every month, just putting up some Ideas here.
My current setup uses scheduled sql file execution on the database, the file looks like this currently:
Also not sure if this has been submitted yet but, currently using essentials /afk playtime is still being monitored even tho I have Ignoreafk=true.
And while altering the config file, reloading the config using /stats reload would just rollback any changes done to a version that the plugin loaded on server start.
Sorry for the long wall of text ... I'm used to forums mostly :P
-
View User Profile
-
Send Message
Posted May 1, 2014@UnDrac
Oh, I thought that worked. Even tested... Guess it broke some time ago. I'll get to fixing it.
-
View User Profile
-
Send Message
Posted May 1, 2014@Lolmewn Nope ... unless the player is online /stats player doesn't show the playtime. I can however set up signs to constantly show playtime of whoever I'm monitoring but I can't create one for every single player on the server.
-
View User Profile
-
Send Message
Posted May 1, 2014@UnDrac
You can use snapshots, actually. I'll be adding 'monthly highscores' and stuff soon to my Highscores plugin (link in plugin description) so that's gonna be awesome.
Stats for offline players are already viewable afaik.
@sinder33
Latest version will, as stated, only work with builds #3034 and above (That's 1.7.8 I think). There is no need to reset the database, all stats are kept. When a player logs in, the plugin checks if their UUID is in the database. If not, checks if the player name is in the database. If that is the case, it adds the UUID to that name. If not, it's a new player and an all new player gets added.
Names also get updated if they change.
-
View User Profile
-
Send Message
Posted May 1, 2014Is the latest version on stats (UUID update) working for 1.7.2 servers? Will this reset all data ? Do i need to delete the data in MySQL so it can support UUID?
-
View User Profile
-
Send Message
Posted Apr 30, 2014Any chance of being able to view stats of offline players?
EDIT: maybe the offline players was a thing of my setup but ... is there any chance of making it so it exports one or more types of stats like this:
onto a text file and reset that certain stat for every stat type defined for all the users?
Or an option to schedule a database export of the stats on a certain date and reset all the stat tables after the export?
I'm trying to achieve a sort of monthly achievements thing, rather than an all-time stats counted.
I technically already have a way of doing this by manually executing a SQL file at whatever date I need to, but I was wondering if it could be automated via the plugin instead.
-
View User Profile
-
Send Message
Posted Apr 28, 2014@catprowler
Do you own the server you run (VPS/DS)? If so, you will need to solve this problem yourself (Google is a very nice tool). If you are on a server host, you will need to contact support with how to connect to MySQL. They might have a specific setup.
-
View User Profile
-
Send Message
Posted Apr 28, 2014@catprowler
Just google on how to enable it.
-
View User Profile
-
Send Message
Posted Apr 27, 2014@Lolmewn
If my MySQL user is not allowed external connections does that mean I cant use this plugin. Is there a way to turn it on?
-
View User Profile
-
Send Message
Posted Apr 27, 2014@catprowler
Make sure you have sufficient permissions ;) Just try connecting using something other than the plugin, for example. Google around a bit if that won't work. It's very likely your MySQL user is just not allowed external connections.
-
View User Profile
-
Send Message
Posted Apr 27, 2014@Lolmewn
Hi :D so how do I fix that? It also said this http://pastebin.com/GXm6imxn
-
View User Profile
-
Send Message
Posted Apr 27, 2014@catprowler
Best guess: User doesn't have permissions for database, user doesn't have permissions for external connections, or something along those lines anyway.
-
View User Profile
-
Send Message
Posted Apr 27, 2014Hi there, I have tried this plugin many times before and it is giving me the same result. I keep doing the in-game automatic configuration, but it can not connect. I have given it all the information provided in the config file and I've changed the server name in server properties file. Could there be a particular reason why this never wants to connect for me? The console says Error: Stats Couldn't retrieve connection from pool, errroring. Thank you.
-
View User Profile
-
Send Message
Posted Apr 26, 2014@dannob123
Theres only 4 tables, there should be at least 5 (latest even has 7).
Any errors when starting up the server? Otherwise it should create that table.
-
View User Profile
-
Send Message
Posted Apr 26, 2014@Lolmewn
I am confused because mysql has created tables for Stats but it still gets those errors even after the plugin has been reloaded
proof - http://gyazo.com/e33a6f09bf1604ae9d40956255b91055
-
View User Profile
-
Send Message
Posted Apr 26, 2014@dannob123
Try restarting the plugin, apparently the table doesn't exist
-
View User Profile
-
Send Message
Posted Apr 25, 2014Can anyone help me? 26.04 04:04:23 [Server] WARN Couldn't connect to global server! Maybe it's offline... 26.04 04:04:23 [Multicraft] Skipped 2 lines due to rate limit (30/s) 26.04 04:04:18 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [?:1.7.0_11] 26.04 04:04:18 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [?:1.7.0_11] 26.04 04:04:18 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.scheduler.CraftTask.run(CraftTask.java:53) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at nl.lolmewn.stats.Main$7.run(Main.java:986) [Stats%20(2).jar:?] 26.04 04:04:18 [Server] INFO at nl.lolmewn.stats.Main.access$300(Main.java:45) [Stats%20(2).jar:?] 26.04 04:04:18 [Server] INFO at nl.lolmewn.stats.Main.runTableUpdates(Main.java:581) [Stats%20(2).jar:?] 26.04 04:04:18 [Server] INFO at nl.lolmewn.stats.Main.executeNewQueue(Main.java:750) [Stats%20(2).jar:?] 26.04 04:04:18 [Server] INFO at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) [Stats%20(2).jar:?] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.Util.getInstance(Util.java:382) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) [cbdev.jar:git-Bukkit-1.7.2-R0.3-59-g6efeddf-b3074jnks] 26.04 04:04:18 [Server] INFO at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [?:1.7.0_11] 26.04 04:04:18 [Server] INFO at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.7.0_11] 26.04 04:04:18 [Server] INFO at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [?:1.7.0_11] 26.04 04:04:18 [Server] INFO at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.7.0_11] 26.04 04:04:18 [Server] INFO com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'nyc2684.Stats_player' doesn't exist 26.04 04:04:18 [Server] ERROR null
-
View User Profile
-
Send Message
Posted Apr 25, 2014@dannob123 http://dev.bukkit.org/bukkit-plugins/lolmewnstats/files/48-stats-v1-37/