PlayTime
Playtime is a plugin for tracking numerous times for particular players. Currently within its release stage, it can track the time that a player has been online, been alive for, and how long they have played on the server in total. It currently supports three forms of data management, which are MySQL, SQLite, and flat file storage using yaml files. There is also tracking of AFK players (if you wish to enable it), and I try to keep everything within this plugin as configurable as possible. Please, if you have any type of feedback at all, don't hesitate to leave a comment! I usually try to add new ideas within a week of requesting it if I deem that it is appropriate for the plugin.
News: Playtime-2.0.0!
There are plans for an upcoming re-write of the Playtime plugin in its entirety! You can view the notes on this update at the link below:
http://dev.bukkit.org/bukkit-plugins/playtime/pages/development/#w-upcoming-features
This will add some major overhauls, including an incredible re-write of the event system, finally fixing the event system to allow for player-defined events after a certain time period.
Have questions on the update, or need help with the plugin in general? Leave a comment below or feel free to talk to me direct via IRC: #codelanx
Updating to Playtime 1.4.1+
Note that v1.4.0 introduces an event system with a few example events placed in. If you would not like any events to be used at all, simply remove everything in the events.yml file and save it as blank.
Installation
- Download the jar file and put it in your plugin folder
- Start your server
- PlayTime has generated a config.yml in your plugins folder, customize it so it can connect to your database
- Restart your server
Requirements
Java 6 or higher
Features
- Logs PlayTime for users currently online, updates it every minute
- Logs the PlayTime in a MySQL database
- Looking up your own play time with a command
- Look up up someone elses play time with a command
- See how long since your last death
- See how long since someone else's death
- Stop tracking the time of AFK players
- Flatfile support (yml files) - Deprecated, will return in the future
- SQLite support
- Dynamic configuration updating
- Asynchronous data management
- Time spent online since login
- Other languages - Currently supported: en_US (English), de_DE (German)
- Firing Console commands when a time is reached
- Add top for total time played
- Add command to switch between data managers
- Automatic updating and version checking. This is possible to disable under the "update" section of the config. For more information, read the Configuration page
For a full list of upcoming features, feel free to look here: http://dev.bukkit.org/server-mods/playtime/pages/development/
Metrics Stats
Playtime uses metrics, which keeps track of information such as OS, player count, java version, and other specific information in an anonymous fashion. You can view the collected information by clicking the graph below, and it is used for any potential future development for specific groups that develop within statistics:
This can be disabled in the Metrics configuration for all plugins, under plugins/PluginMetrics/config.yml , and set "opt-out" to true. Keep in mind this will make your server not report any information, and I love stats almost as much as cats </3
@AreQPL
When I integrate the plugin to have alternate languages, I'll be able to host lang files on github to be downloaded if someone wants an alternate language. At that point there will be a public form for it :p
@predawnia
Depends on what the error is. If you can, grab a copy of the error and upload it to http://pastie.org/ , then link it back here. If it is due to table creation, that will be fixed in v1.3.0 (releasing soon hopefully).
Does version 1.2.0 work with CB 1.5.2 ? It seems to be random crashing and restarting my server.
By the way I could translate whole plugin to polish language if you want me to. Just PM me how to do this.
Okay, im waiting for release :D If you dont mind send me a link on PM, please :)
btw: by using this plugin on my srv, your metrics stats seem to have almost doubled :P
@AreQPL
Type /version Playtime into your console. What version are you running?
Edit: I just tested this myself, and you're correct. I'll update the 1.3.0 build of playtime, and have it re-submitted for approval so that it will work perfectly in 1.3.0.
Edit Edit: You can view the patch I just made yourself below :) https://github.com/1Rogue/PlayTime/commit/a5e0f68f772c708d8ae90789458364fb92de5f8e
Plugin doesnt work at all for me. It doesnt create mysql table.
@AreQPL
Sure thing! I've added it to my list for 1.4 here: https://github.com/1Rogue/PlayTime/issues/12
I suggest a command to see top times of playing time. Something like /money top but /playtime top. Playtime top would show 5 top times of each individual player and you would be able to go to the next page (/playtime top 2 , 3 , 4....). I would appreciate if you could add that :D
@kevinxsalerno
Events sound interesting, definitely haven't seen those yet. I'll throw them up on my things to add in!
Edit: Added here: https://github.com/1Rogue/PlayTime/issues/11
This plugin looks more promising than the sack of crap 'ontime' plugin which fails horribly at being cross server.
Can you please add some sort of event manager so that I can execute commands for a player after they have played for x amount of time?
Also, like hammer said - the tables don't generate.
@ChaoticSpiders
Considering it uses SQL for data storage, the plugin wouldn't do anything, why?
I am going to be making flatfile and sqlite storage available as of Playtime 1.3.0 (hopefully releasing that before next thursday), but overall SQL is still one of the best options for data storage.
Is there a way to remove the SQL thing?
@HammerHedd
Yup, it's a bug that is going to be fixed in Playtime 1.2.0. You should see the new version of the plugin on this page in (hopefully) under 30 hours.
for some reason, it's not creating a table in the database, although it does show that it is connected. Any ideas? I tried removing it (and the playtime folder) and letting it regen everything, but the same result - no table.
Playtime v1.2.0 is now submitted to dbo for approval. Some requested features that are being added:
@predawnia
Sure thing, I'll add it in with either 1.1.3 or 1.2!
Hi, I made a ticket for enhancement. http://dev.bukkit.org/bukkit-plugins/playtime/tickets/2-playtime-since-last-died/
@sonic656
Aha, thank you! I unfortunately had left in a bit of code when I was testing table creation. If you open the sql database, there is probably a table named "testing". If you rename this to "playTime" it will work. I'll put in a patch today and submit the jarfile for approval.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'myDB.playTime' doesn't exist\
Must I create the table manualy?
@sidekick358
Nope! If the mysql server is hosted externally (i.e. on a webserver outside your home), you don't need to port forward. If you run the sql server on the same machine as your server, you also would not need to. The only case where you would need to portforward would be if you ran the sql server at home and the server elsewhere.
@sidekick358
I've got a release put in now, this fixes a few memory leaks and uses much better statements which will improve performance significantly!