Statistics lite
This is an admin plugin which gives the server's admins some valuable information about the user's login times, newest logins on the server, number of blocks placed & broken etc.
How it works
Statistics lite uses PatPeter's great SQLibrary and logs user activity into a SQLite file/database. The various commands of this plugin are then used to query the database and give out some useful info about the players.
Statistics lite uses Vault for the abstraction of the permissions & chat color handling: it reads the player groups and their chat color settings automatically via Vault. That means that whatever permission groups (for example newbie/normal/moderator/admin) and their corresponding chat colors you have set up for your server, this plugin will detect and use them when printing out info about the users.
Installing the plugin
This plugin needs Vault and SQLibrary so make sure you have them installed on your server.
Drop Statistics_lite.jar to your plugin folder - it auto-creates the configuration.
Configuration
As of v0.2, configuration has changed a bit. If you update from v0.1 to v0.2, the config file is changed and the old parameters are not deleted. Best way to update is to delete the old config and let the plugin regenerate the new one. The config file is so dead simple that there is no extra harm in doing this.
# How many stats are shown by a "page" lists_per_page: 10
Permissions
- statistics.stats -> this is the basic permission which needs to be set for anyone to use any of the commands of this plugin
Other permissions are given per command and are described in the next section.
Commands
[] = mandatory parameter
{} = optional parameter
Command | Description | Example | Permission |
---|---|---|---|
/stats self {page} | Show info about your latest logins. | /stats self 3 | statistics.stats.self |
/stats user [username] {page} | Show info about player [username]. | /stats user Etsija 3 | statistics.stats.user |
/stats new {page} | Newest logins on your server, sorted in descending order of time. | /stats new 3 | statistics.stats.new |
/stats newp {page} | Newest players on your server, sorted in descending order of the latest login time of the players. | /stats newp 2 | statistics.stats.newp |
/stats since [time] {page} | Show all logins since a given time. Format of [time] is 1d2h3m4s, where d=days, h=hours, m=minutes, s=seconds. Any one of those can be omitted. | /stats since 10d 3 /stats since 1h40m | statistics.stats.since |
/stats date [yyyy-mm-dd] {page} | Show login info on a diven date. | /stats date 2014-05-01 3 | statistics.stats.date |
/stats top [online/logins/avg/build/break] {page} | Show top players, sorted by a criteria | /stats top build (gives top 10 builders) | statistics.stats.top |
To-do
- CSV output per-day: daily server statistics (players, logins, total online time, blocks placed, blocks broken)
top player listsadd block place/break info to the screensblock place/break events handling and DB table additionslogin-specific basic infologin events handlingplayer & logins tables
Version v0.4 is on its way here (takes about a week for Bukkit team to check it). New:
Version v0.3 is up, with the "/stats date" command. Quite a lot of Java Generics added to the code, which makes it even easier to update & add new commands.
v0.2 is on its way to BukkitDev now, with some revamping of the commands to make them more logical and useful. Now the plugin architecture is ready for me to add more commands easily. Next up is the "/stats date 2014-05-07" command, which would print out the login statistics, total playtime etc. of a particular day. This can be interesting for the admins, especially for monitoring the activities of special event days etc.