PlayTimeManager icon

PlayTimeManager -----

A playtime tracker with customization options and automated rewards for efficient monitoring




UpdateChecker false check has been fixed
Now UpdateChecker uses PaperMC Hangar as source.
Double UpdateChecker Instance has been removed.
----------, Feb 19, 2025

New Features & Improvements
New placeholders

Added new placeholders for converting formatted playtime into a specific time unit:
  • %PTM_playtime_#_<nickname>%
  • %PTM_lastseen_elapsed_#_<nickname>%
  • %PTM_playtime_top_#_<rank>%
  • %PTM_lastseen_elapsed_top_#_<rank>%
And a new placeholder to display a player's LuckPerms prefix in the leaderboard:
  • %PTM_lp_prefix_top_<rank>%

Available time units (#): s (seconds), m (minutes), h (hours), d (days), y (years)

Hex colours
Support for hex colours has been added with the following format: &#rrggbb.
Mixing legacy colours (e.g. &6), styles (e.g. &l) and hex colours is supported, an example:

&l&#8000FF[&#9B00E6M&#B200D9e&#C600CCm&#D900BFb&#EC00BFe&#FF00B3r] → Displays "[Member]" in bold and gradient hex colours.

New customization options in the config.yml
  • prefix : This will set the custom prefix that will appear before all messages generated by the PlayTimeManager plugin
  • playtimetop.leaderboard-format: This will set the format for each line in the chat leaderboard.
    • Available placeholders:
    • %POSITION% - Player's position in the leaderboard (1, 2, 3, etc.)
    • %PREFIX% - Player's prefix from LuckPerms
    • %PLAYER_NAME% - Player's username
    • %PLAYTIME% - Player's total playtime formatted
  • placeholders.enable-errors: If enabled, errors in placeholders will be displayed otherwise the text in default-message will be shown instead of error messages
  • placeholders.default-message : The default message to display when enable-errors is set to false.
  • A new placeholder %PREFIX% is available for playtime-self-message and playtime-others-message and, if used, will display the LuckPerms prefix of the specified player.
First join date
Added tracking of players' first server join dates. The system will now automatically record when new players join for the first time. For existing players in the database who joined before this update, their first join date will be set when they next connect to the server after the update is installed.

Playtime <playername> stats
/playtime <playername> lastseen has been replaced with /playtime <playername> stats and requires the permission playtime.others.stats
Now upon execution this command will display:
  • Playtime
  • Artificial playtime (modified with add/remove subcommands)
  • Join date
  • Last seen date
  • Time elapsed since last seen date
  • Goals achieved of the specified player.
Playtimetop
Playtimetop is now completely customizable through config.yml, making it more adapt to be shown to players.
Now it is no longer needed to specify the number of players to load, as 100 will be default.
Pages are optional and clickable (and hoverable) arrows have been added in chat to scroll the entire leaderboard. The command has also been optimized.

Playtimepercentage
PlaytimePercentage now supports second and years, furthermore multiple time formats as input is now accepted (e.g. 1y,2m,3s).

Bug Fixes
Fixed the display of a text-wall of attributes when clicking on the barrier of /playtimegoal's GUI when no goals exist.

Fixed sound execution upon goal completion for version 1.20

Fixed /playtime * reset command which was refusing to execute when specifying *

Fixed crash when resetting players data
----------, Feb 19, 2025

Removed a print which wasn't supposed to be there.
Updated the UpdateChecker.
----------, Feb 11, 2025

Database & Data Integrity

  • nickname and uuid must now be unique in the database to prevent duplicates and ensure data integrity.
  • New UUID mapping system:
    • Allows updating the UUID of an already registered player based on their nickname.
    • Prevents any instance of duplicates even when switching from a premium to a cracked server (though this is not recommended).

New Features & Improvements

Playtime & Goal Enhancements

  • Years as input: The plugin now accepts years (e.g., 1y, 4d, 4m) and automatically converts 365d into 1y. (closes #2)
  • New placeholder for goals:
    • %GOAL_NAME% now dynamically displays the corresponding goal’s name in messages.
  • New subcommands for /playtimegoal & /playtime:
    • /playtimegoal rename: Rename goals without having to recreate them.
    • /playtime <playername> lastseen: Displays when a player was last seen and how long it has been since then.
      • Requires new permission: playtime.others.lastseen

New Auto Update System


Playtime Limits & Overflow Checks

  • New playtime limits:
    • Maximum: Long.MAX_VALUE (~14.6 million years).
    • Minimum: Strictly 0.
  • Additional overflow and underflow checks have been added.

Bug Fixes

  • Fixed double insertion of groups permissions in goals when upgrading from 3.0.4 to 3.1.
  • Resolved caching inconsistencies when switching between online and offline user states.

New Placeholders

Playtime & Last Seen Placeholders

  • %PTM_PlayTime_<nickname>% → Displays a player's total playtime.
  • %PTM_Lastseen_<nickname>% → Shows when a specific player was last seen (date). (closes #2)
  • %PTM_Lastseen_Elapsed_<nickname>% → Displays how long it has been since a player was last seen (formatted duration). (closes #2)
  • %PTM_Lastseen_Top_#% → Shows when the player at position # was last seen.
  • %PTM_Lastseen_Elapsed_Top_#% → Displays how long it has been since the player at position # was last seen.

Date Formatting

  • New config field: datetime-format
    • Allows customization of date formats for placeholders and /playtime <playername> lastseen output.

Quality of Life Improvements

  • Added autocomplete for online players' nicknames as the first argument of the /playtime command.
    • Requires permission: playtime.others

Backward compatibility
Version 3.2 will automatically update configs and DB from older versions up to 3.0.4.
----------, Feb 10, 2025

I'm excited to introduce version 3.1 of the plugin, bringing improved functionality, performance, and new possibilities! Here’s what’s new:
1. Goals: A New Era Replacing Groups
- File-Based Goals: Goals are now managed via individual YAML configuration files for greater flexibility and customization.
- Each goal includes its own message, sound, activation status, commands, permissions and group assignments, continuing the seamless integration with LuckPerms.
- New Commands System: Assign commands to execute automatically when players achieve specific goals.
- New Goal Management Command: Use /playtimegoal to open a fully revamped GUI for personalizing and managing your goals effortlessly.
2. Reset Command for Playtime Data
- Introduced the /playtime <playername> reset command to completely reset a player’s playtime data:
- Database records
- Goals achieved
- Playtime statistic registered by the server
- You can use * in place of <playername> to reset all players’ data stored in the play_time database.
3. Optimized Performance with Caching and Data Persistance
- Placeholders now update faster without querying the database every time.
- Cache is automatically cleared every 6 hours to maintain optimal memory performance.
- Online user data is automatically saved to the database every 5 minutes, reducing the potential loss of playtime data to a maximum of 5 minutes in case of a server crash.
Automatic Database Migration with Backup
- The plugin will handle your database migration to version 3.1 automatically.
- A backup compatible with version 3.0.4 will be created to ensure data safety in case of any issues.
----------, Jan 25, 2025

-- NEW: Fixed a critical startup issue

A new automatic config update system has been implemented
: thanks to the neo config-version field in config.yml file, the plugin will automatically update your config (maintaining all of your settings) when a new config version is released.

The playtimegroup add subcommand has been renamed to "set" to better reflect its functionality. It now adds a new group or overwrites an existing one.

Groups data has been moved from config.yml to DB. The automatic config update will take care of the migration if necessary.

playtimegroup list subcommand has been added
----------, Aug 21, 2024

A new automatic config update system has been implemented: thanks to the neo config-version field in config.yml file, the plugin will automatically update your config (maintaining all of your settings) when a new config version is released.

The playtimegroup add subcommand has been renamed to "set" to better reflect its functionality. It now adds a new group or overwrites an existing one.

Groups data has been moved from config.yml to DB. The automatic config update will take care of the migration if necessary.

playtimegroup list subcommand has been added
----------, Aug 4, 2024

Supports Minecraft from 1.20 to 1.21

Added backwards compatibility with 1.20
Now playtime add|remove and playtimegroup commands support multiple time formats at a time
Added possibility to specify seconds when adding or removing the playtime
Fixed startup crash when luckperms was not installed on the server
Fixed playtimegroup removeGroup subcommand


Fix from 3.0.2:
Updated playtime add|remove commands to reflect correct changes even with low tps
Fixed artificial playtime so it now doesn't get added/removed from actual playtime after every login
Now artificial playtime is taken into consideration for playtimeaverage, playtimepercentage and playtimetop commands
----------, Jul 28, 2024

Supports 1.21

Updated playtime add|remove commands to reflect correct changes even with low tps
Fixed artificial playtime so it now doesn't get added/removed from actual playtime after every login
Now artificial playtime is taken into consideration for playtimeaverage, playtimepercentage and playtimetop commands
----------, Jul 25, 2024

1.21 support added
----------, Jul 22, 2024

Resource Information
Author:
----------
Total Downloads: 328
First Release: Jul 22, 2024
Last Update: Feb 19, 2025
Category: ---------------
All-Time Rating:
2 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings