
Playtime Tracker is a velocity plugin, allowing you to easily log and view player playtime across all of your servers without needing to spend time setting up databases and whatever else. With Playtime Tracker, you can:
- Log Player Playtime: Automatically track and record the playtime of every player on your server.
- View Playtime: Easily check your own or other players' playtime with simple commands.
- MySQL Support (MariaDB): Since v1.8 the plugin now also optionally supports saving playtime into a database.
- Playtime Toplist: Display a leaderboard of players with the most playtime. The length of the toplist can be configured.
- Fully Configurable Messages with MiniMessage support: Customize all plugin messages with gradients to ensure they fit with your server's theme and style. In the config, you can also use total version of playtimes, and the %place%, for example: %totaldays% instead of %days% if you want it to start only from days, not weeks. You can also use the %place% placeholder.
- PlaceholderAPI support: Download my PlaytimeLink plugin to your bukkit, paper, etc servers if you want to have placeholders from this plugin.
- Caching System: Boosts performance for servers where the proxy only has limited resources and/or there is a big toplist limit set in the config with multiple instances of the playtimelink plugin accessing it, by storing frequently accessed playtime, and config entries for faster retrieval. If any issues arise, playtime caching can be disabled in the config file.
- Rewards System: You can make the plugin execute commands when players reach specific playtimes. Example config:

Commands:
- /playtime : View your playtime. Aliases: /pt.
- /playtime [player] : View another player's playtime.
- /playtime add [player] [time in sec].
- /playtime sub [player] [time in sec].
- /playtime set [player] [time in sec].
- /playtimetop : Playtime toplist. Aliases: /pttop, /ptt.
- /playtimereload : Reload the config. Aliases: /ptreload, /ptrl.
- /playtimeresetall: Reset every playtime. Aliases: /ptra, /ptresetall.
Permissions:
Can be enabled optionally:
- vpt.getowntime : Allows players to view their own time statistics.
- vpt.getotherstime : Allows players to view the time statistics of other players.
- vpt.gettoplist : Allows players to view the toplist of time statistics.
Always enabled:
- vpt.reload : Config reload permission.
- vpt.modify : Playtime modify permission.
- vpt.ptresetall : Playtime reset all permission.
- vpt.spam : Bypass spam checks permission.
- vpt.rewards.exempt : Exempt a player from getting rewards.
The plugin isn't complete yet, upcoming features:
- Scrollable Toplist: Navigate through the playtime toplist with ease.
Feature requests and bug reports are welcome on github, thank you for the 4000 downloads.
All Versions
+ Add Version- Updated to **java 21**, which the plugin now requires.
- The default messages parser is now minimessage, with gradients, and console colors support.
- Playtime is now handled in seconds, as it was redundant to use milliseconds for this. Your saves will automatically be converted, **but you'll need to convert the rewards by yourself, if used.**
- Fixed a bug where the plugin would throw an error if the player was disconnected from the proxy before being fully connected.
- Fixed a bug where adding to someone's playtime who wasn't in the cache didn't put them on the toplist when needed.
- You can now tab complete your own name too on pt modify commands.
- Added on option in the config to define excluded servers, where playtime won't be counted.
- Added support for configuring the plugin's command names and aliases in the config.
- Removed the old config data converter, as there was no point in having it anymore.
- Made it so the update checker now properly closes it's HttpClient after usage.
- Updated libs.
_Note: You should also update PlaytimeLink, if used._
- Potentially fixed a bug where playtime was frequently reset for some people.
- Database reconnections and errors are now handled better, and other general improvements with the database manager code.
- Fixed a bug where if you changed the time of a player who was cached but wasn't online, it wouldn't be saved.
- Fixed a bug where if there are multiple rewards cmds to be execued at the same time after adding to someone's playtime, they might get executed too fast for db operations.
- Other smaller bug fixes and optimizations, plus updated some libs.
- Made it so now if you add to someone's playtime, it will trigger the corresponding playtime rewards, which the player would've gotten normally.
- Added a config entry to set wheter the above should work with offline players too, since the "vpt.rewards.exempt" perm can't be checked for them.
- Updated libs & some other general improvements.
- Added commands to add, subtract, and set player playtime, with a customisable msg that only shows if it's executed by a player, so it doesn't clutter the console when it's used in automation.
- Added the permission vpt.modify for the above cmd.
- Added the permission vpt.rewards.exempt to exclude players from getting rewards.
- Fixed some bugs with the rewards system.
- Fixed a bug where the %place% placeholder would show -1 if the player wasn't in the toplist.
- Removed the cmd /ptreset, since the new cmds made it useless
- Fixed a bug where a task kept repeating infinitely every second if playtimelink wasn't being used, causing an infinite spam on neoforge servers.
- Fixed a bug with tabcomplete.
_Note: PlaytimeLink has also been updated._
- Fixed a potential exploit, thanks to [SpigotRCE](https://github.com/SpigotRCE).
- Fixed a bug where if a database timeouted the plugin's connection, it couldn't interact with the db anymore.
- Made it so the %place% placeholder can now be also used in the messages of this plugin, not just with playtimelink.
- Added support for multiline text. (Use \n)
- Changed the way the plugin synces playtime with ptlink a bit, making it potentially more optimal.
- General improvements with the code.
_You should also update PlaytimeLink._
- Added total versions of placeholders to the plugin that can be used in the config. (Ex: %totaldays% instead of %days%)
- Fixed a bug where if you entered a name that isn't in the config or cache, the plugin would sometimes send an incorrect message.
- Made the update checker work again by changing it to use the modrinth api.
- Updated some libs.
(Also updated [PlaytimeLink](https://modrinth.com/plugin/playtimelink/version/1.4.7))
- Fixed a bug where sometimes the placeholders wouldn't load when the server was restarted, by adding confirmation packets.
- Added an option to preload placeholders.
- Made it so the playtime commands now also display days and weeks.
_Note: You also need to update PlaytimeLink._
- Fixed a potential issue with the Database driver preventing this plugin from working correctly with others that might use the same driver.
- Added an AntiSpam system with permission support and a configurable message for the pt and pttop commands.
- Added MySQL (MariaDB) support to the plugin.
- Fixed a bug where placeholders wouldn't update after the proxy was restarted.
- Fixed a bug where even if a server was shut down, the plugin was still trying to sync playtime with it.
- Updated almost all libs.
_You should also update PlaytimeLink_
- Optimized the way individual playtimes are synced.
- Optimized the way toplist is synced when there are multiple instances of PlaytimeLink requesting it.
- Added support for executing commands when players reach specific playtime milestones. --Support for executing them on the bukkit servers will come later.
- Some other smaller fixes.
# v1.7.5:
- Playtime syncing will now be handled properly when multiple servers are requesting it at the same time, fixing multiple bugs.
- Reduced unnecessary traffic between the proxy and bukkit servers by changing the way the two plugins communicate.
- Reworked the config system, now all the config entries will be cached at startup instead of being read always at runtime.
- MiniMessage support fixed, now all the messages will properly utilize it.
- Fixed a bug where if you reset someone's playtime while having cache enabled, the toplist didn't update accordingly.
- Fixed a bug where if you reset every playtime, while having cache enabled, the toplist would show entries of people with 0 playtime.
- Fixed multiple bugs with the toplist that occurred if you didn't have the cache enabled.
- Made the updater asynchronous so it doesn't slow down the startup process, along with some other async related changes.
- Other smaller bug fixes.
- Removed a debug message that was left in accidentally.
- Added support for gradient messages, you can now chose between vanilla and minimessage parsing in the config.
- Added an update checker to the plugin, which can be turned off in the config.
- Added a command to reload the config. (Note: It doesn't affect the caching options)
- Added commands to reset the playtime of an individual, or all players.
- Made all events and the toplist code async, and fixed a bug with the join event.
- Fixed a bug where you could check your own playtime even if you didn't have permission for it.
- Made it so permissions also affect the tab-complete of the command now.
- The data converter now only checks for outdated Data files on the first startup.
- The plugin now checks if you've entered the correct amount of agruments for commands.
- Some other smaller fixes and optimizations across the plugin.