RedisStats
by superpeanut911
Note: This plugin will NOT work without a Redis Server! This plugin also only supports 1.7. No 1.6!
This plugin is meant more as a tutorial than to be used on an actual server (It is still fully functional for that) You can find the source code HERE It is heavily commented and I tried to make use of the different Redis features (Like pipelining!) even if it was not 100% needed in that situationIt uses Redis Hashes with the key as the players UUID, and it uses hIncr to increment the hash! I am open to requests on other stat tracking options if you would like! This plugin is 100% configurable (see below)
How to set up a Redis server:
If you are using Debian or Ubuntu, you can simply run apt-get install redis-server as root (Or sudo)
Read the official Redis page for information: http://redis.io/topics/quickstart
You may also need to allow connections to Redis remotely if it is on a different machine. To do so, check your /etc/redis/redis.conf, and make sure to change the default bind 127.0.0.1 to bind 0.0.0.0 and restart it with service redis-server restart
Also note that this plugin can call to Redis very often, especially with a lot of players online! Make sure your Redis server is running on decent hardware! (No 10 year old potatoes please) With proper hardware and optimizations, it's possible to squeeze even a million requests per second to Redis!! (http://skipperkongen.dk/2013/08/27/how-many-requests-per-second-can-i-get-out-of-redis/)
Features:
- Kill/Death stats
- Block break stats
- Server join stats
- 100% configurable
- Open to any stat tracking requests you would like! PM me or respond to resource discussion!
![]()
Config:
The config is fairly simple and self explanatory
Support:Code (Text):#Server IP - If not localhost you are going to need to allow remote connections in Redis Config
redis-server: 127.0.0.1
#Redis port - Default is 6379
redis-port: 6379
#Collect kill and death stats
kill-death-stats: true
#Collect join stats
join-stats: true
#Collect block break stats
block-breaks: true
#Collect blocks placed stats
blocks-placed: true
- Shooting me a quick PM or responding on the discussion will most likely suffice!

RedisStats 1.1
Use Redis for stats such as kills and deaths!