Stats & Achievements
This Project is currently abandoned (and probably will forever be). See here for a alternative plugin
2-in-1 Stats and Achievements
This plugin logs various player activity as stats in a MySQL or SQLite database. With the integrated achievement system it is possible to award players when they reached a predefined target.
Features
- Logs block, mob, pvp and miscellaneous player statistics very detailled
- Logs also crafting statistics when spout is installed
- Integrated achievements system
- New database format which is more performant than older databases
- Integrated time delay to reduce server load and the number of SQL queries
- Planned web stats system
- Compatible with every Bukkit version since 1.1-R4
Tools
- You can convert older databases using our utility: http://89.144.25.51:8888/convert.php
- Achievements generator (will be extended soon): http://plugins.maniacraft.de/SaAPlugin/achgen
Requirements
- Vault (Permissions)
- Spout (if you want to get crafting stats)
Commands
- /stats help - General Help
- /stats [<player>] - Shows your stats or stats by <player>.
- /stats block [<player>] <block>[:<data>] - Shows stats for <block>.
- /stats pvp [<player>] [<player2>] - Shows PVP stats.
- /stats mob [<player>] [<mob>] - Shows mob damage stats.
- /achievements help - General Help
- /achievements [<player>] - Shows your obtained achievements or achievements obtained by <player>.
- /achievements list [<page>] - Lists all available achievements.
- /achievements admin add <name> <description> <category> <block> <data> <value> <command> - Adds a new achievement.
- /achievements admin remove <id> - Removes the achievement <id>.
- /achievements admin convert - Convert old achievements.
Achievement Commands
- /give <block>[:<data>] [<amount>] - gives the player the item <block> <data>
- All commands available on your server. Example (Essentials warp): /warp darkroom %player%
Permissions
Permission | Description |
---|---|
stats.show.blocks.own | Show own block stats |
stats.show.blocks.other | Show block stats by others |
stats.show.pvp.own | Show own pvp stats |
stats.show.pvp.other | Show pvp stats by others |
stats.show.mob.own | Show own mob stats |
stats.show.mob.other | Show mob stats by others |
stats.overview.own | Show your overview |
stats.overview.other | Show overview by others |
stats.receive | Log stats at all (for example not for Guests) |
achievements.receive | Gives achievements at all (for example not for Guests) |
achievements.admin.remove | Admin Command Remove |
achievements.admin.add | Admin Command Add |
achievements.admin.convert | Admin Command Convert achievements from old DB |
achievements.list | List all achievements |
achievements.show.own | Show obtained achievements |
achievements.show.other | Show achievements obtained by others |
Config
general: language: en # Language (Available: en/de, other languages can be added in plugins/StatsAndAchievements/lang/) update-delay: 30 # The time interval in seconds how often the stats will be updated in the database (Default and recommended: 30) achievements: true # Activating and deactivating Achievements text_color: '&6' # Color of command texts (1st color) data_color: '&7' # Color of data output (2nd color) debug: false # Debug output (Default and recommended: false) database: type: mysql # Database type, either mysql or sqlite table_prefix: '' # Table prefix to save stats of more than one server in a single database host: localhost # Only MySQL: Database server (Default: localhost) port: 3306 # Only MySQL: Database server port (MySQL default 3306) database: minecraft # Only MySQL: Database name user: root # Only MySQL: Database user password: stats123 # Only MySQL: Database password DisabledWorlds: # In this worlds the stats will be deactivated - disabledworld1 - creative listeners: blockStats: true # Block related stats brewingStats: true # Brewing related stats (maybe bugged) craftingStats: true # Crafting related stats (maybe bugged) enchantingStats: true # Enchanting related stats (maybe bugged) entityStats: true # Entity related stats playerStats: true # Player related stats (Your really should NOT disable this or you'll break everything!) playerMoveStats: true # Player move stats (if you experience lags you should set this to false) vehicleStats: true # Vehicle related stats
Language file formating
{br} - Line break &[0-f] - Color codes (http://img109.imageshack.us/img109/4334/mccolors.png) %[A-Z0-9]% - Internal variables, don't supposed to be translated!
@jamy469
Fixed in "1.10-SNAPSHOT #2" which will appear as soon as its approved from bukkitdev staff.
When I try to remove an achievement in game, it doesn't do anything, it just comes up with the command list.
I am typing '/achievements admin remove achievement1'
It is quite annoying and i'd like to get this resolved ASAP. Thanks
@ManiacTwister
It might not be code. I think it's the indexes. I removed the unique from the index and will re-test.
@rsaylor73
Mh.. Can't reproduce this. Could you try it with this debug version please? http://data.s7t.de/StatsAndAchievements-1.10-DEBUG.jar
would be nice if it logged the full query thought then we could see the actual query error.
Actually some more details on the SQL error:
When the error happened the player kill was not recorded:
8:46:14 AM CONSOLE: [INFO] spectral_ninja was slain by Hiimjbags 8:48:46 AM CONSOLE: [WARNING] [StatsAndAchievements] [MySQL]: Error in SQL query: Data truncation: Out of range value for column 'data' at row 1 8:48:48 AM CONSOLE: [WARNING] [StatsAndAchievements] [MySQL]: Error in SQL query: Data truncation: Out of range value for column 'data' at row 1
I was testing with another user, they killed my player and it logged 42 for data. Then they killed a mob that logged 28 for data. Then they killed me again but this time it was logging damage taken for both players. Once killed the SQL error happened and the kill and death was not recorded.
@rsaylor73
I am getting that too, doesnt seem to effect anything though.
@ManiacTwister
Thanks, loving the plugin so far!
@jjacobson
I'll add them to the list later.
Edit: done.
What are the entity ids for the new minecraft mobs? Like withers and witherskeletons?
Thanks it's working!
I've seen a few of these in the logs now:
3:20:25 PM CONSOLE: [WARNING] [StatsAndAchievements] [MySQL]: Error in SQL query: Data truncation: Out of range value for column 'data' at row 1
Thanks, I overlooked the receive testing now but I am sure it will work fine now. Sorry about the false alarm.
@ManiacTwister
Ok that works, thanks!
@rsaylor73
Check if the players where nothing gets recorded have the needed permissions.. stats.receive etc (look above)
I have 1.9.3 installed. The otherday it was recording new players to the mysql DB now it stopped recording new players. However, existing players in the database it is recording kills, etc.
@jjacobson
Maybe try this:
INSERT INTO `achievements` (`name`, `description`, `type`, `block`, `data`, `value`, `command`) VALUES ('cow 1', 'Kill 1', 'KILLS', 0, 29, '1', '/say it works');
But it's just a warning, it should work anyway i guess.
@ManiacTwister
Any idea why it is still not working for me when I use this?
INSERT INTO `achievements` (`name`, `description`, `type`, `block`, `data`, `value`, `command`) VALUES ('cow 1', 'Kill 1', 'KILLS', '', 29, '1', '/say it works');
1 row(s) affected, 1 warning(s): 1366 Incorrect integer value: '' for column 'block' at row 1
@Hyakkoo
Check your Database settings.
Now I just get this
INSERT INTO `achievements` (`name`, `description`, `type`, `block`, `data`, `value`, `command`) VALUES ('1zombie', 'kill 1 zombie', 'KILLS', '', '17', '1', 'eco give %player% 100');
1 row(s) affected, 1 warning(s): 1366 Incorrect integer value: '' for column 'block' at row 1
@ManiacTwister
Thanks!