[INACTIVE][INFO] Playtime Tracker v0.6 - Log player time and activities online (MySQL/SQLite) [1240]

Discussion in 'Inactive/Unsupported Plugins' started by cwingrav, Aug 23, 2011.

  1. Offline

    cwingrav


    Description:
    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: I've seen other plugins do this but they either are discontinued, buggy or use flat files. They've done a great job. They didn't fit our needs however so Playtime Tracker was created to fill our, and hopefully some other people's needs.

    Download: PlaytimeTracker.jar
    Source: moc_PlaytimeTracker_v0.2.tar.gz
    Dependency: MOCDBLib.jar - see its forum page, project page

    Wiki Link: Minds of Chimera: PlayTime Tracker


    Demonstration Video:


    Screen Shot:
    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".
    [​IMG]

    [​IMG]

    Commands:

    Code:
    /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 user [player] [world] - prints user states about their activities in the world
    /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:
    Show Spoiler
    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:
    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.

    Configuration:
    Show Spoiler

    It uses MOCDBLib for its persistence so see that plugin for more details. Here is a bit that might help you out:

    File: ./plugins/PlaytimeTracker/DBLib.properties:

    Code:
        MySQL=false
        host=localhost
        database=playtimetracker
        username=root
        password=pass
        port=3306
    These settings configure the storage of people's online time. If MySQL is false, then it creates an SQLLite db. If you use MySQL, remember to manually create the given database in mysql. Thanks to the SQLite project for original database code. Currently uses a new DB library based upon it.
    NOTE: This file should generate on the fly if you don't have it. Default is MySQL=false.

    Features Requested:
    • Properties file for setting the names of the databases this is using. This will allow multiple servers to run off the same MySQL server. (ok, will do)
    • Is it possible to have playertime be a variable the MOTD can use? So "Welcome <player> who has been online <X>days and <Y> hours." (ok, will do)
    • /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)
    • Report top X for all, for things other than the login time. (This requires a rework of my datastructures, but it will be more optimal so will do it)
    • Log sumall to the server fine.
    Revision History:
    see the project page
     
  2. Offline

    cwingrav


    Let me know if you figure out how to fix the first issue.

    The second issue is that you have an old version of MOCDBLib.jar. Install a new version in your plugins directory. Link for it is at top. NOTE: The exception is because I am actually catching the version number of that library to verify it is up to date, but I switched from decimal to integer version numbers and that is causing the exception. I catch this exception now so in the future, you should get a nice clean error message to update MOCDBLib.jar... what I was already trying to do. <sigh>

    Thanks for the feedback. Let me know if I can continue to help and improve things.
     
  3. Offline

    Schuetrumpf2

    Just to clarify, my compatibility issues were NOT from PlaytimeTracker. PlaytimeTracker appeared to work just fine on the higher versions, aside from that one out-of-date file. My issues came from other plugins. I installed the updated MOCDBLib.jar, and I no longer have the error. Thanks.
     
  4. Offline

    Rayden

    Some way to have only specific groups show up with a sumall or lastonall command would be nice. We get quite a few of guests who just pop in, look around, and leave. So I'd only like to get data from my regular members. Something like a"PlaytimeTracker.Tracked" permission node I can add to the groups I want to track.

    A second request would be to display the output of a sumall or lastonall command in the server.log. Currently the output is only shown ingame, but it would be a lot easier if I could run the command ingame, then look at the server log for the results so I can read it in a nice text format.
     
  5. Offline

    cwingrav

    I like the server log option. For the first, i'd have to have all kinds of configuration and commands to set up groups of users. The more code I write, the more I have to maintain and fix. I'd rather keep this small and orderly.

    As a side note, I am working on a simple webpage to display all this stuff, along with other user data (ooooo, a MineCraft Armory page!). If people are interested, I might release that too but it would require people to run apache and that is probably beyond most.
     
  6. Offline

    King_KYl3

    Can u plz add it so custom able time they play so eg. they play 10 days it excutes a command so like /promote user group that would be epic :)
     
  7. Offline

    Rayden

    I'd be very interested, and I'm sure I wouldn't be the only one. A webpage would make it very easy to see who's active and who isn't, heck if you can make a webpage I wouldn't even need to server.log part. :)
    As long as it displays lastonline and total playtime I'd be very happy.
     
  8. Offline

    bigggan

    @cwinggrav

    Can we color the message output?

    And can you make the command simpler? Like /playtime <player> and leave blank to show youre time.
    Or /pt <name>?
     
  9. Offline

    rskelhorn

    Careful using this plugin using minecraft 1.0.0 and dev bukkit, there are major spam console bugs had to disable for now
     
  10. Offline

    King_KYl3

    Good thing would be to have stats on your website :p mayb html or php XD
     
  11. Offline

    Pr07o7yp3

    I need something like that.
     
  12. Offline

    iAmHokum

    this still alive/working?
     
  13. Offline

    redstonehax

    This is what iv bin looking for ty
     
  14. Offline

    cublikefoot

    I hope this will be updated as it no longer works. This is an essential part to my server as I base everyone's ranks (permission groups) around their playtime.
     

Share This Page