MOC Playtime Tracker

Description:

The Minds of Chimera (MOC) Playtime Tracker tracks time players have been online (total time as well as last time on), as well as useful stats of their activity, in a MySQL or SQLite db. Gives top X reports as well (like top 5 players in time spent playing).

NOTE: Other plugins do this but they either are discontinued, buggy or use flat files. They've done a great job but didn't fit our needs so Playtime Tracker was created to fill our, and hopefully some other people's needs.

Part of the Minds of Chimera Project (dev)
MOCPlaytimeTracker | MOCDBLib | RegenBlock | MOCGoodEats | MOC3DImporter | MOCKiosk | MOCChemistry
Minds of Chimera
See development versions in action on our server: isue-server.eecs.ucf.edu



Features:

  • Log time players have been online.
  • Report time online as a sum or as the last time they were on.
  • Log player activities such as killing mobs and players, placing/destroying blocks, movement, etc.
  • Report different player activities.
  • Report top X charts of player activities and time online.
  • Store data in a database: SQLite or MySQL.
  • Uses a caching system to minimize database read/writes and avoid server blocking (darn single threads).

Media:

Demonstration video.

As of version 0.3, it logs player events per world. Here is what the output of: "/playtimetracker user cwingrav world" displays, where the user is "cwingrav" and the world name is "world".

It also lists the top performers in a category.


Commands:

/playtime - Prints amount of time you have played.
/playtime sum - Prints amount of time you have played.
/playtime sum [player] - Prints stats about time spent playing.
/playtime sumall - Prints stats about time spent playing for all players ever logged in.
/playtime laston - Lists last login times of self.
/playtime laston [player] - Lists last login times of the given player.
/playtime lastonall - Lists last login times of all players.
/playtime full - for the player, list their sum and laston
/playtime full [player] - for the given player, list their sum and laston
/playtime stats (player) (world) - prints user states about their activities in the world
/playtime debugon - spews debugging information
/playtime debugoff - stops spewing debugging information
/playtime recountall - forces the database to recount all player entries. Use if something is screwed up for 'sum'.
/playtime help|? - lists help
/playtime top [criteria] [# to print] [world] - Prints the top 5 in the categories this is tracking. Default is top 5 online time.
[criteria] currently include: online, place, destroy, die, moved, pk, hk, fk
pk=player kills, hk=hostile kills, fk=friendly kills (like cows, pigs, etc).


Permissions:

PlaytimeTracker.admin:
description: Access to debug and clear the log.
default: op
PlaytimeTracker.self:
description: Gives access to discover the amount of time the player is online.
default: true
PlaytimeTracker.player:
description: Gives access to discover the amount of time a player is online or last on.
default: false
PlaytimeTracker.all:
description: Gives access to discover the amount of time all players are online or last on.
PlaytimeTracker.top:
description: Lets people list the top X for a given value.


Installation (and Configuration):

  1. add the PlaytimeTracker.jar file to your plugins directory.
  2. add the MOCDBLib.jar file to your plugins directory.
  3. follow the configuration instructions below if you connect to a MySQL database.
    1. create the plugins/PlaytimeTracker/DBLib.properties file (running the server once will create this)
    2. configure these options for your setup. This uses MOCDBLib for this so see its page for further details.
      MySQL=false
      host=localhost
      database=playtimetracker
      username=root
      password=pass
      port=3306
      

Troubleshooting

  • A common error is to skip the installation of the MOCDBLib.jar plugin.
  • Check the server.log file for a list of errors. I try to be descriptive if it fails.
  • When reporting a bug, please list a lot message error and information about your database configuration (i.e. MySQL or SQLite).
  • /playtime recountall - This is useful if something gets mixed up with the online time counting.
  • I'll do my best to help. Cheers.


Feature Requests

  • Properties file for setting the names of the databases this is using. This will allow multiple servers to run off the same MySQL server.
  • /afk support (interesting, might do but I will have to make a lot of changes to support this and to make sure it doesn't impact the server)
  • Log sumall to the server file.
  • Track per-world time online. so, /playtime <player> [world]

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files