PlayTime » 1.17 - 1.21.10 icon

PlayTime » 1.17 - 1.21.10 -----

Track players playtime, reward them for it, and easily see the top playtimes.




[​IMG]

Commands »

[​IMG]

Aliases:
pt, playertime, onlinetime, timeplayed, ot

Permissions »
Permission Description
Code (Text):
playtime.reload
Access to the reload sub-command.
Code (Text):
playtime.clearrewards
Access to the clearrewards sub-command.

Images »

(/playtime)
[​IMG]

(/playtime top)
[​IMG]

(/playtime rewards)
[​IMG]
[​IMG]

(/playtime clearrewards (player))
[​IMG]

Chat notification upon auto-claiming a reward: [​IMG]

PlaceholderAPI »
Placeholder Description
Code (Text):
%playtime_playtime%
Displays the total playtime of the player viewing the placeholder (formatted).
Code (Text):
%playtime_playtime_seconds%
Displays the total playtime of the player viewing the placeholder in raw seconds.
Code (Text):
%playtime_<name>_playtime%
Displays the total playtime of the specified player (formatted). Example:
Code (Text):
%playtime_Notch_playtime%
Code (Text):
%playtime_top_<spot>_name%
Displays the username at a top position (1+). Returns your configured no-data fallback if there’s no player at that position.
Code (Text):
%playtime_top_<spot>_displayname%
Displays the display name (supports PlaceholderAPI prefixes/color if available) at a top position (1+). Falls back to username, then to no-data.
Code (Text):
%playtime_top_<spot>_time%
Displays the total playtime at a top position (1+). Returns no-data if there’s no player at that position.
Code (Text):
%playtime_top_position%
Shows the viewer’s current rank (1-based) among non-excluded players. Aliases:
Code (Text):
%playtime_position%
,
Code (Text):
%playtime_rank%
. Returns no-data if not ranked.
Code (Text):
%playtime_playtime_weeks%
Total playtime in weeks (with label).
Code (Text):
%playtime_playtime_days%
Total playtime in days (with label).
Code (Text):
%playtime_playtime_hours%
Total playtime in hours (with label).
Code (Text):
%playtime_playtime_minutes%
Total playtime in minutes (with label).
Code (Text):
%playtime_playtime_weeks_no_label%
Total playtime in weeks (number only).
Code (Text):
%playtime_playtime_days_no_label%
Total playtime in days (number only).
Code (Text):
%playtime_playtime_hours_no_label%
Total playtime in hours (number only).
Code (Text):
%playtime_playtime_minutes_no_label%
Total playtime in minutes (number only).
— Session (overall) —
Code (Text):
%playtime_session%
Displays the player’s current session playtime (formatted).
Code (Text):
%playtime_session_seconds%
Displays the player’s current session playtime in raw seconds.
Code (Text):
%playtime_session_hours%
Current session playtime in hours (with label).
Code (Text):
%playtime_session_minutes%
Current session playtime in minutes (with label).
Code (Text):
%playtime_session_hours_no_label%
Current session playtime in hours (number only).
Code (Text):
%playtime_session_minutes_no_label%
Current session playtime in minutes (number only).
— Daily (overall) —
Code (Text):
%playtime_daily%
Displays the player’s playtime for today (formatted).
Code (Text):
%playtime_daily_hours%
Today’s playtime in hours (with label).
Code (Text):
%playtime_daily_minutes%
Today’s playtime in minutes (with label).
Code (Text):
%playtime_daily_seconds%
Today’s playtime in seconds (with label).
Code (Text):
%playtime_daily_hours_no_label%
Today’s playtime in hours (number only).
Code (Text):
%playtime_daily_minutes_no_label%
Today’s playtime in minutes (number only).
Code (Text):
%playtime_daily_seconds_no_label%
Today’s playtime in seconds (number only).
— Daily (per reward key) —
Code (Text):
%playtime_daily_<key>_current%
Today’s current progress toward the daily reward (formatted).
Code (Text):
%playtime_daily_<key>_required%
Required time for the daily reward (formatted).
Code (Text):
%playtime_daily_<key>_remaining%
Remaining time to reach the daily reward (formatted).
Code (Text):
%playtime_daily_<key>_progress%
Displays progress as
Code (Text):
current / required
(formatted).
Code (Text):
%playtime_daily_<key>_progress_percent%
Displays percent progress (0–100%).
— Session (per reward key) —
Code (Text):
%playtime_session_<key>_current%
Current session progress toward the session reward (formatted).
Code (Text):
%playtime_session_<key>_required%
Required session time for the reward (formatted).
Code (Text):
%playtime_session_<key>_remaining%
Remaining session time to reach the reward (formatted).
Code (Text):
%playtime_session_<key>_progress%
Displays progress as
Code (Text):
current / required
(formatted).
Code (Text):
%playtime_session_<key>_progress_percent%
Displays percent progress (0–100%).
— Unique (per reward key) —
Code (Text):
%playtime_unique_<key>_current%
Current total playtime toward the unique reward (formatted).
Code (Text):
%playtime_unique_<key>_required%
Required total playtime to unlock the unique reward (formatted).
Code (Text):
%playtime_unique_<key>_remaining%
Remaining time to the unique reward (formatted).
Code (Text):
%playtime_unique_<key>_progress%
Displays progress as
Code (Text):
current / required
(formatted).
Code (Text):
%playtime_unique_<key>_progress_percent%
Displays percent progress (0–100%).
— Constant (per reward key; progress toward next cycle) —
Code (Text):
%playtime_constant_<key>_current%
Current cycle progress (time since last constant reward; formatted).
Code (Text):
%playtime_constant_<key>_required%
Interval length for the constant reward (formatted).
Code (Text):
%playtime_constant_<key>_remaining%
Remaining time until the next constant reward (formatted).
Code (Text):
%playtime_constant_<key>_progress%
Displays cycle progress as
Code (Text):
current / required
(formatted).
Code (Text):
%playtime_constant_<key>_progress_percent%
Displays percent cycle progress (0–100%).
— Streaks (per streak key) —
Code (Text):
%playtime_streak_<key>_days%
Total days required to complete the streak.
Code (Text):
%playtime_streak_<key>_duration%
Required daily duration (pretty format, e.g. “1h”, “30m”).
Code (Text):
%playtime_streak_<key>_count%
Current consecutive days achieved toward the streak.
Code (Text):
%playtime_streak_<key>_progress%
Displays streak progress as
Code (Text):
days_played / days
.
Code (Text):
%playtime_streak_<key>_claimed_today%
Whether the streak reward was claimed for the most recent completed day (true/false).

Configurable files »
Code (Text):
# ============================================================
#                     PlayTime Configuration
# ============================================================
# This file controls how playtime is formatted, how rewards work,
# MySQL syncing, update checks, and all the GUI layouts.
# ============================================================

settings:
  # ----------------------------------------------------------
  # PLAYTIME FORMAT
  # ----------------------------------------------------------
  # Which time units to display when formatting playtime.
  # Valid units: day, hour, minute, second
  # Remove or comment out a line to hide that unit.
  # Example (no seconds):
  #   Time-Format-Units:
  #     - day
  #     - hour
  #     - minute
  # ----------------------------------------------------------
  Time-Format-Units:
    - day
    - hour
    - minute
    - second

  # Labels appended after each number for the given unit.
  # Examples:
  #   "1 day", "2 days"
  #   "1 hour", "5 hours"
  # Controlled together with Append-Formats-With-An-S.
  Time-Formats:
    Day: " day"
    Hour: " hour"
    Minute: " minute"
    Second: " second"

  # Whether to automatically add "s" for plurals:
  # true  -> "2 days"
  # false -> "2 day"
  Append-Formats-With-An-S: true

  # ----------------------------------------------------------
  # REWARDS & CLEAR NOTIFICATIONS
  # ----------------------------------------------------------
  Rewards-Cleared:
    # When an admin clears a player’s rewards:
    # If true, the affected player will receive a chat message.
    # If false, only the admin sees the confirmation.
    Tell-Target-All-Their-PlayTime-Rewards-Were-Cleared: true

  Rewards:
    # Master toggle for all PlayTime rewards.
    # true  -> Rewards system enabled.
    # false -> No rewards are given or claimable.
    Enabled: true

    Auto-Claim:
      # If true, eligible rewards are automatically given.
      # If false, players must use the GUI to claim rewards manually.
      Enabled: true

  # ----------------------------------------------------------
  # PLAYTIME SOURCE
  # ----------------------------------------------------------
  # If true:
  #   Use the existing playtime data from the world/playerdata
  #   where possible as the base.
  # If false:
  #   Use PlayTime's own tracking from the moment the plugin is installed.
  Use-existing-playtime: true

# ============================================================
#                      UPDATE CHECK SETTINGS
# ============================================================
update-check:
  # Enable or disable automatic update checks.
  enabled: true

  # Permission node required to see update notifications.
  permission: playtime.update

  # Message when a new version is available.
  # Placeholders:
  #   %latest%  - Latest available version
  #   %current% - Your current version
  message: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &fA new version, &b%latest%&f, is available. You're running &e%current%&f."

  # Text for the clickable button that opens the download link.
  button-text: "&7[&a&lClick to Download&7]"

# ============================================================
#                      PLACEHOLDER SETTINGS
# ============================================================
placeholders:
  # Fallback text when a "top position" placeholder or similar
  # has no data (e.g., top_10 on a server with only 3 players).
  no-data: '---'

# ============================================================
#                          MySQL SETUP
# ============================================================
# Used for storing and syncing playtime data across servers.
# If you're running a single server and don't need external
# storage or cross-syncing, keep this disabled.
# ============================================================
mysql:
  # Master toggle for MySQL.
  enabled: false

  # Basic connection credentials.
  host: localhost
  port: 3306
  database: playtime
  username: root
  password: password
  table: playtime_data

  # SSL & security.
  use-ssl: false                   # Enable only if your MySQL server requires SSL.
  allow-public-key-retrieval: true # Some hosts require this for authentication.

  # Connection behavior / reliability.
  auto-reconnect: true             # Reconnect automatically on connection loss.
  connect-timeout-ms: 8000         # How long to wait when opening a new connection.
  socket-timeout-ms: 0             # 0 = no limit (be careful with this on unstable networks).

  # Keepalive / dead-connection detection.
  tcp-keepalive: true
  keepalive-minutes: 5

  # Reconnect strategy.
  reconnect-attempts: 3
  reconnect-interval-ms: 2000

  # Data sync between multiple servers:
  # If true:
  #   All connected servers using this database share one unified
  #   up-to-date playtime value per player.
  sync-between-servers: true

# ============================================================
#                           GUI SETTINGS
# ============================================================
# Customize the appearance and behavior of PlayTime GUIs:
# - Top playtimes leaderboard
# - Rewards menu & type menus
# ============================================================
guis:

  # ----------------------------------------------------------
  # TOP PLAYTIMES GUI
  # ----------------------------------------------------------
  Top:
    # Title of the Top Playtimes GUI.
    Title: '&fᴛᴏᴘ &bᴘʟᴀʏᴛɪᴍᴇꜱ'

    # How many players to show.
    How-Many-Players-To-Display-In-The-GUI: 10

    # Format of the player's line (left-display) in the GUI.
    # Placeholders:
    #   %position% - Rank position (1, 2, 3, ...)
    #   %player%   - Player name
    Players-Name: '&b#%position% &7» &b%player%'

    # Format of the playtime under/alongside the player's entry.
    # Placeholder:
    #   %playtime% - Formatted playtime string
    Players-Playtime: '&7%playtime%'

  # ----------------------------------------------------------
  # REWARDS MAIN MENU GUI
  # ----------------------------------------------------------
  Rewards:
    Main:
      # Title and size of the main rewards GUI.
      Title: '&bᴘʟᴀʏᴛɪᴍᴇ &fʀᴇᴡᴀʀᴅꜱ'
      Size: 27  # Must be a valid inventory size (multiple of 9)

      # Optional decorative border around the GUI.
      Border:
        Enabled: true
        Item:
          material: BLACK_STAINED_GLASS_PANE
          name: '&r'
          lore: []

      # ------------------------------------------------------
      # CORE REWARD CATEGORY BUTTONS
      # ------------------------------------------------------
      # Each entry:
      #   slot: inventory slot (0-26 for size 27)
      #   action: open-type | run-command | open-url | none
      #   type: constant | unique | session | daily | streaks (for open-type)
      #   material / itemsadder-id / texturepackmanager-id / skull / etc.
      #   name: display name
      #   lore: list of lore lines
      Items:
        constant:
          slot: 10
          action: open-type
          type: constant
          material: DIAMOND
          name: '&bConstant'
          lore:
            - '&7Repeatable rewards'
            - '&7based on total playtime'

        unique:
          slot: 12
          action: open-type
          type: unique
          material: EMERALD
          name: '&aUnique'
          lore:
            - '&7One-time milestones'

        session:
          slot: 14
          action: open-type
          type: session
          material: IRON_INGOT
          name: '&6Session'
          lore:
            - '&7Stay online for a duration'

        daily:
          slot: 16
          action: open-type
          type: daily
          material: GOLD_INGOT
          name: '&eDaily'
          lore:
            - '&7Once per day'

        streaks:
          slot: 22
          action: open-type
          type: streaks
          material: TRIPWIRE_HOOK
          name: '&cStreaks'
          lore:
            - '&7Play X minutes per day'
            - '&7for Y days'

      # ------------------------------------------------------
      # EXTRA / CUSTOM BUTTONS & DECORATION
      # ------------------------------------------------------
      # Use this to add:
      # - Links (Discord, Store, Website)
      # - Decorative items
      # - Command buttons, etc.
      #
      # Each entry supports:
      #   slot: inventory slot
      #   action:
      #     - open-type      → open a reward category (constant/unique/session/daily/streaks)
      #     - run-command    → run a command AS CONSOLE
      #     - player-command → run a command AS THE PLAYER
      #     - open-url       → send a clickable chat link
      #     - none           → purely decorative
      #
      #   command/url: the command or URL to use
      #   material: Bukkit material name (or use itemsadder-id / texturepackmanager-id / skull)
      #   name: display name
      #   lore: list of lore lines
      #   optional:
      #     custom-model-data: integer
      #     glow: true/false
      #     flags: [HIDE_ENCHANTS, HIDE_ATTRIBUTES, ...]
      #     skull.owner: player name or UUID
      #     skull.texture-base64: custom head texture
      #     itemsadder-id: "packname:item_id"
      #     texturepackmanager-id: "your_item_id"
      #
      # IMPORTANT (commands):
      #   - For run-command (console):
      #       The command is run by CONSOLE.
      #       Example: "say %player% clicked the head!"
      #       (Don't use "/")
      #
      #   - For player-command (player):
      #       The command is run by the PLAYER who clicked.
      #       You SHOULD use the leading "/" like a normal chat command.
      #       Example:
      #         action: player-command
      #         command: "/spawn"
      #
      Extras:
        # Example: Discord button
        - slot: 4
          action: open-url
          url: "https://discord.gg/yourserver"
          url-label: "&bJoin our Discord"
          material: BOOK
          name: "&bDiscord"
          lore:
            - "&7Click to open a link"

        # Example: clickable player head (runs a CONSOLE command)
        - slot: 0
          action: run-command
          command: "say %player% clicked the head!"
          material: PLAYER_HEAD
          skull:
            owner: "Notch"          # Or a UUID
            # texture-base64: ""    # Or use a custom base64 texture
          name: "&aFamous Head"
          lore:
            - "&7Runs a console command"
          glow: true

        # Example (commented) of a PLAYER command button:
        # - slot: 8
        #   action: player-command
        #   command: "/spawn"       # NOTE: leading "/" so it runs exactly as the player types it
        #   material: ENDER_PEARL
        #   name: "&aGo to Spawn"
        #   lore:
        #     - "&7Click to run &f/spawn &7as the player"

        # Examples for ItemsAdder / TexturepackManager are left commented out:
        # - slot: 8
        #   action: none
        #   itemsadder-id: "packname:cool_button"
        #   name: "&dA cool button from ItemsAdder"
        #   lore: ["&7Button go click"]
        #
        # - slot: 18
        #   action: none
        #   texturepackmanager-id: "sky_pick"
        #   name: "&dTPM default sky_pick item"

    # --------------------------------------------------------
    # REWARD TYPE BROWSING MENU (PER CATEGORY)
    # --------------------------------------------------------
    TypeMenu:
      Size: 54
      # Title format when viewing a specific reward type.
      # Placeholder:
      #   %type% - The current type (Constant, Unique, etc.)
      Title-Format: '&b%type% &fʀᴇᴡᴀʀᴅꜱ'

      # Navigation / control buttons within the type menu.
      Controls:
        Prev:
          slot: 45
          material: ARROW
          name: '&c« &fPrevious'

        Next:
          slot: 53
          material: ARROW
          name: '&fNext &a»'

        Back:
          slot: 49
          material: BARRIER
          name: '&cBack'

        # Optional: refresh button to re-open or reload the page.
        Refresh:
          slot: 45
          material: SUNFLOWER
          name: '&bRefresh'
          lore:
            - '&7Click to refresh this page'

      # Status labels for rewards shown in the GUI.
      Status:
        # Players already claimed this reward.
        Claimed: '&a✔ &7Claimed'

        # Eligible and auto-claim is active.
        Eligible-Auto: '&b⏵ &7Auto-claim enabled'

        # Eligible but requires manual click.
        Eligible-Click: '&e⏵ Click to claim'

        # Not enough playtime yet.
        Not-Eligible: '&7Not yet eligible'

Code (Text):
# ============================================================
#                       PlayTime Messages
# ============================================================
# All messages used by the PlayTime plugin.
# ============================================================

# Global prefix used in most messages.
prefix: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &f"

messages:

  # ----------------------------------------------------------
  # PLAYTIME DISPLAY MESSAGES
  # ----------------------------------------------------------
  playtime:
    # Message shown when a player checks THEIR OWN playtime:
    #   /playtime
    # Placeholders:
    #   %prefix%      - Global prefix
    #   %playtime%    - Formatted playtime
    #   %joins%       - Number of joins (LEAVE_GAME statistic)
    #   %date-joined% - First join date (yyyy-MM-dd)
    self:
      - "%prefix%&fYou've played for &b%playtime%&f."
      - "%prefix%&fTimes Joined: &b%joins%"
      - "%prefix%&fFirst Joined: &b%date-joined%"

    # Message shown when checking ANOTHER player's playtime:
    #   /playtime <player>
    # Placeholders:
    #   %prefix%
    #   %player%      - Target player's name
    #   %playtime%
    #   %joins%
    #   %date-joined%
    other:
      - "%prefix%&b%player% &fhas played for &b%playtime%&f."
      - "%prefix%&b%player% &fjoined &b%joins% &ftimes."
      - "%prefix%&b%player% &ffirst joined on &b%date-joined%&f."

    # Message shown when there is no stored playtime data for a target:
    #   (e.g., /playtime <player> where we have no data)
    # Placeholders:
    #   %prefix%
    #   %target% - Name used in the command or resolved player name
    not-found:
      - "%prefix%&cNo &fplaytime data found for &b%target%&f."

  # ----------------------------------------------------------
  # GENERIC / SYSTEM MESSAGES
  # ----------------------------------------------------------

  # Sent after /playtime reload
  reloaded: "%prefix%&aConfiguration reloaded."

  # Optional: message used when opening the Top GUI (if referenced).
  top-header: "%prefix%Opening top playtimes..."

  # No permission message for restricted commands.
  no-permission: "%prefix%&cYou do not have permission to do that."

  # Sent when a command must be run by a player, but the sender is console.
  player-only: "%prefix%&cOnly players can run this command."

  # Sent when a player name / profile cannot be resolved or is invalid.
  # Used for nonexistent names like "SAWETJCAEWTJHCA".
  invalid-player: "%prefix%&cPlayer not found."

  # Generic invalid usage (fallback, if/when used).
  invalid-usage: "%prefix%&cInvalid usage."

  # ----------------------------------------------------------
  # REWARD CLEAR / MANAGEMENT MESSAGES
  # ----------------------------------------------------------
  # Used with:
  #   /playtime clearrewards
  #   /pt clearrewards
  # And related flows.
  # ----------------------------------------------------------

  # Sent TO THE TARGET (if enabled in config.yml) when their rewards are wiped.
  # Requires:
  #   settings.Rewards-Cleared.Tell-Target-All-Their-PlayTime-Rewards-Were-Cleared: true
  rewards-were-cleared: "%prefix%Your playtime reward data has been &creset&f."

  # Sent to the staff/admin performing /clearrewards after success.
  # Placeholders:
  #   %player% - Target whose rewards were cleared
  cleared-players-rewards: "%prefix%All reward data for &b%player% &fhas been &ccleared&f."

  # Sent if an admin tries to confirm clear for a player whose data
  # is not pending confirmation.
  # Placeholders:
  #   %player% - Admin name
  player-not-on-the-confirm-list: "%prefix%That players' PlayTime rewards aren't pending clear. &7(&e/pt clearrewards %player%&7)"

  # Sent when trying to clear "constant" rewards, which are intentionally permanent.
  constant-rewards-cant-be-cleared: "%prefix%&bConstant &frewards can't be reset. The rewards are intended to always be able to be redone."

  # Sent when daily rewards are cleared for a target.
  daily-rewards-were-cleared: "%prefix%&eDaily &frewards were &ccleared &ffor &b%player%&f."

  # Sent when streak rewards are cleared for a target.
  streaks-were-cleared: "%prefix%&cStreak &frewards were &ccleared &ffor &b%player%&f."

  # Sent when session rewards are cleared for a target.
  session-rewards-were-cleared: "%prefix%&6Session &frewards were &ccleared &ffor &b%player%&f."

  # Sent when unique rewards are cleared for a target.
  unique-rewards-were-cleared: "%prefix%&aUnique &frewards were &ccleared &ffor &b%player%&f."

  # Sent if an invalid reward type is specified in:
  #   /playtime clearrewards <player> <type>
  invalid-reward-type: "%prefix%&cInvalid &freward type. Use: &aunique &for &6per-session"

  # Sent if an admin tries to add the same player to the confirmation list twice.
  # Placeholders:
  #   %player% - Name already in confirm list
  players-data-already-in-confirm-list: "%prefix%The reward data for &b%player% &fis already pending confirmation. &7(&e/pt clearrewards %player% confirm&7)"

  # Sent when reward system is globally disabled in config.yml.
  rewards-disabled: "%prefix%Rewards are &cdisabled&f."

  # ----------------------------------------------------------
  # OFFLINE NOTICE
  # ----------------------------------------------------------
  # Sent (when configured by code) to indicate that a valid player
  # is currently offline when checking their playtime.
  # Placeholders:
  #   %prefix%
  #   %player% - Target player's name
  player-offline: "%prefix%&b%player% &fis currently &coffline&f."

  # ----------------------------------------------------------
  # HOVER / CLICK CONFIRMATION MESSAGES
  # ----------------------------------------------------------
  # Used for clickable confirmation in chat when clearing rewards.
  hover-message:
    # Main line shown in chat with a clickable component.
    # Placeholders:
    #   %prefix%
    #   %player% - Target whose rewards are about to be cleared
    message-in-chat: "%prefix%You need to confirm clearing &lALL &fof &b%player%s' &freward data. &7(&a&lClick to confirm&7)"

    # Text displayed when hovering over the clickable confirmation line.
    # Placeholders:
    #   %player%
    hover: "&fClick to confirm clearing of &b%player%s' &freward data."

  # ----------------------------------------------------------
  # CLEAR REWARDS HELP / BREAKDOWN
  # ----------------------------------------------------------
  # Shown when running /playtime clearrewards with no/invalid args.
  clear-rewards-breakdown:
    - "%prefix%Usage: &e/pt clearrewards (player) [reward-type]"
    - "                     &7(required) [optional]"
    - "&f"
    - "&fValid reward types: &aunique &f& &6per-session"

  # ----------------------------------------------------------
  # HELP MESSAGE LIST
  # ----------------------------------------------------------
  # Displayed when running:
  #   /playtime help
  # or as a fallback in some invalid usage cases.
  help:
    - "%prefix%&e/playtime &7- &fView your playtime."
    - "%prefix%&e/playtime (player) &7- &fView another player's playtime."
    - "%prefix%&e/playtime rewards &7- &fView rewards for playtime milestones."
    - "%prefix%&e/playtime clearrewards (player) [reward-type] &7- &fClear all or a specified type of reward data for a player."
    - "%prefix%&e/playtime top &7- &fView top playtimes."
    - "%prefix%&e/playtime reload &7- &fReload plugin configuration."

Code (Text):
# rewards.yml
# Constant rewards repeat every X seconds of TOTAL playtime.
# Each reward entry requires:
#   interval: seconds (integer)
#   commands: commands to run (use %player% as placeholder)
#   message: (optional) message to send to the player

# pages and slots both start at 0
constant:
  two_hours:
    page: 0
    slot: 0
    material: DIAMOND
    name: "&b%interval%"
    lore:
      - "&7Earn a reward every &b%interval%&7."
      - ""
      - "&fProgress: &b%progress%"
      - ""
      - "&fReward: &a%reward%"
      - "&fType: &bConstant"
    interval: 7200 # 2 hours
    commands:
      - "eco give %player% 100"
    message: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &fYou received &a$100 &ffor reaching 2 hours played!"
    gui-interval: "2 hours"
    reward-desc: "$100"
    permissions-required: []

# Unique rewards are given ONCE when total playtime reaches the threshold.
unique:
  two_days:
    page: 0
    slot: 0
    material: EMERALD
    name: "&a%interval%"
    lore:
      - "&7Earn a special reward for"
      - "&7hitting a specific milestone."
      - ""
      - "&fProgress: &b%progress%"
      - ""
      - "&fReward: &a%reward%"
      - "&fType: &aUnique"
    achieved:
      material: LIME_WOOL
      name: "&aAchieved - %interval%"
      lore:
        - "&7You've already achieved this reward."
        - ""
        - "&fReward: &a%reward%"
        - "&fType: &aUnique"
    at: 172800  # 48 hours
    commands:
      - "give %player% diamond 5"
    message: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &b2 day &fmilestone reached! Enjoy &b5 diamonds&f."
    gui-interval: "2 days"
    reward-desc: "5x diamonds"
    permissions-required:
      - playtime.rewards.unique1
      - playtime.rewards.rank1

# Session rewards can be earned by a player being logged in
# in one session, without logging out of the server, for the
# set amount of required time for the reward to be given.
session:
  stay_30m:
    page: 0
    slot: 0
    material: IRON_INGOT
    name: "&a%interval%"
    lore:
      - "&7Earn a reward for staying online"
      - "&7for a certain amount of time"
      - "&7without logging out."
      - ""
      - "&fProgress: &b%progress%"
      - ""
      - "&fReward: &a%reward%"
      - "&fType: &6Session"
    achieved:
      material: LIME_WOOL
      name: "&aAchieved - %interval%"
      lore:
        - "&7You've already achieved this reward."
        - ""
        - "&fReward: &a%reward%"
        - "&fType: &6Session"
    at: 1800  # 30 minutes in a single session (without logging out)
    commands:
      - "eco give %player% 100"
    message: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ Thanks for staying online &b30 minutes &fstraight!"
    gui-interval: "30 minutes"
    reward-desc: "$100"
    permissions-required:
      - playtime.rewards.session1
      - playtime.rewards.rank1

# Daily rewards can be earned once per calendar day
# when the player's playtime for that day reaches the interval.
daily:
  half_hour:
    page: 0
    slot: 0
    material: GOLD_INGOT
    name: "&6%interval%"
    lore:
      - "&7Come back every day and"
      - "&7play for at least &b%interval%&7!"
      - ""
      - "&fProgress: &b%progress%"
      - ""
      - "&fReward: &a%reward%"
      - "&fType: &eDaily"
    achieved:
      material: LIME_WOOL
      name: "&aAchieved - %interval%"
      lore:
        - "&7You've already achieved this reward."
        - ""
        - "&fReward: &a%reward%"
        - "&fType: &eDaily"
    interval: 900 # 15 minutes a day
    commands:
      - "crate key give %player% daily 1"
    message: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &fThank you for playing for &b15 minutes &ftoday! — Here’s a Daily key!"
    gui-interval: "15 minutes"
    reward-desc: "1x Daily Key"
    permissions-required:
      - playtime.rewards.daily1
      - playtime.rewards.rank1

# Streaks require players to play a specified amount
# of time, for a specified amount of days.
streaks:
  example1:
    page: 0
    slot: 0
    material: TRIPWIRE_HOOK
    name: "&b%duration%/day &7for &b%days%d"
    lore:
      - "&7Come back every day and"
      - "&7play for at least &b%duration%"
      - "&7for &b%days%d &7in a row!"
      - ""
      - "&fProgress: &b%progress%"
      - ""
      - "&fReward: &a%reward%"
      - "&fType: &cStreak"
    achieved:
      material: LIME_WOOL
      name: "&aAchieved - &6%duration%/day &7x &6%days%d"
      lore:
        - "&7You've already completed this streak."
        - "&7Progress: &a%days_played%&7/&a%days%"
        - "&fReward: &a%reward%"
    # Core streak settings
    Duration: 60        # minutes required per day
    Days: 7             # consecutive days to complete
    Reset-On-Claim: true    # if the streak data is reset automatically to have the player restart this streak
    reward-desc: "$1000 & 1x Diamond"
    commands:
      - "eco give %player% 1000"
      - "give %player% DIAMOND 1"
    message: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &fStreak '&bexample1&f' completed! +$1000 & a diamond"
    permissions-required:
      - PlayTime.streaks.example1
Support »
The quickest way to get support for any of my resources
would be to join my Resource Discord.
» https://discord.gg/2vUqykD

Note »
Please DO NOT leave bad reviews for any issues
that you have. Please simply PM me or leave it
in the discussion tab. Thank you. (y)

That and reviews are highly appreciated! :alien:

[​IMG]

My other plugins

[​IMG] [​IMG] [​IMG] [​IMG] [​IMG]
Resource Information
Author:
----------
Total Downloads: 11,529
First Release: Jul 31, 2017
Last Update: Nov 16, 2025
Category: ---------------
All-Time Rating:
19 ratings
Find more info at discord.gg...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings