PlayTime » 1.17 - 1.21.5 • Fully configurable icon

PlayTime » 1.17 - 1.21.5 • Fully configurable -----

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



Logomakr_78zw4q.png

Fully configurable
• Optimized code (Aimed at performance)
EXTREMELY lightweight plugin
• Reward players for their playtime
• Easily clear players reward data
• Playtime Top GUI
• Playtime Reward GUI
• PlaceholderAPI support
• Per-file configuration

This plugin can used as-is, but it is
highly recommended to setup rewards
specifically tailored to your server.

Commands »

[​IMG]

Aliases:
pt, playertime, onlinetime, timeplayed, ot

Permissions »

• playtime.reload » Access to command: /playtime reload
• playtime.clearrewards » Access to command: /playtime clearrewards​
Images »
[​IMG]
(/playtime)
[​IMG]
(/playtime top)
[​IMG]
(/playtime rewards)

[​IMG]

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

PlaceholderAPI »

Placeholders:
%playtime% » Displays the playtime of the player viewing the placeholder.
%(name)_playtime% » Displays the playtime of the specified player.

Configurable files »
Code (Text):
# config.yml
settings:
  Time-Formats:
    Day: " day"
    Hour: " hour"
    Minute: " minute"
    Second: " second"
  Append-Formats-With-An-S: true
  Rewards-Cleared:
    Tell-Target-All-Their-PlayTime-Rewards-Were-Cleared: true

guis:
  Top:
    Title: '&fᴛᴏᴘ &bᴘʟᴀʏᴛɪᴍᴇꜱ'
    How-Many-Players-To-Display-In-The-GUI: 10
    Players-Name: '&b#%position% &7» &b%player%'
    Players-Playtime: '&7%playtime%'
  Rewards:
    Title: '&bᴘʟᴀʏᴛɪᴍᴇ &fʀᴇᴡᴀʀᴅꜱ'
 

Code (Text):
# messages.yml
prefix: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &f"

messages:
  playtime:
    self: "%prefix%You have played for &b%playtime%&f."
    other: "%prefix%&b%player% &fhas played for &b%playtime%&f."
    not-found: "%prefix%&cNo playtime found for %target%."
  reloaded: "%prefix%&aConfiguration reloaded."
  top-header: "%prefix%Opening top playtimes..."
  no-permission: "%prefix%&cYou do not have permission to do that."
  player-only: "%prefix%&cOnly players can run this command."
  invalid-player: "%prefix%&cPlayer not found."
  invalid-usage: "%prefix%&cInvalid usage."
  rewards-were-cleared: "%prefix%Your playtime reward data has been &creset&f." # in the config.yml, the setting: "Tell-Target-All-Their-PlayTime-Rewards-Were-Cleared" must be set to "true" for the target to receive this message.
  cleared-players-rewards: "%prefix%All reward data for &b%player% &fhas been &ccleared&f."
  player-not-on-the-confirm-list: "%prefix%That players' PlayTime rewards aren't pending clear. &7(&e/pt clearrewards %player%&7)"
  constant-rewards-cant-be-cleared: "%prefix%&bConstant &frewards can't be reset. The rewards are intended to always be able to be redone."
  per-session-rewards-were-cleared: "%prefix%&6Per-session &frewards were &ccleared &ffor &b%player%&f."
  unique-rewards-were-cleared: "%prefix%&aUnique &frewards were &ccleared &ffor &b%player%&f."
  invalid-reward-type: "%prefix%&cInvalid &freward type. Use: &aunique &for &6per-session"
  players-data-already-in-confirm-list: "%prefix%The reward data for &b%player% &fis already pending confirmation. &7(&e/pt clearrewards %player% confirm&7)"
  hover-message:
    message-in-chat: "%prefix%You need to confirm clearing &lALL &fof &b%player%s' &freward data. &7(&a&lClick to confirm&7)"
    hover: "&fClick to confirm clearing of &b%player%s' &freward data."
  clear-rewards-breakdown:
  - "%prefix%Usage: &e/pt clearrewards (player) [reward-type]"
  - "                     &7(required) [optional]"
  - ""
  - "&fValid reward types: &aunique &f& &6per-session"
  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)
#   command: command to run (use %player% as placeholder)
#   message: (optional) message to send to the player
constant:
  two_hours:
    interval: 7200  # 2 hours
    command: "eco give %player% 100"
    message: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &fYou received &a$100 &ffor reaching 2 hours played!"
    gui-interval: "2 hours"
    reward-desc: "$100"

# Unique rewards are given ONCE when total playtime reaches the threshold.
unique:
  one_day:
    at: 86400  # 24 hours
    command: "give %player% diamond 5"
    message: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &b24 hour &fmilestone reached! Enjoy &b5 diamonds&f."
    gui-interval: "1 day"
    reward-desc: "5x diamonds"

# Per-session rewards can be earned once per calendar day
# when the player's playtime for that day reaches the interval.
per-session:
  daily_half_hour:
    interval: 1800  # 30 minutes in a single day
    command: "crate key give %player% daily 1"
    message: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &fThank you for playing &b30 minutes &ftoday! — Here’s a daily key!"
    gui-interval: "30 minutes"
    reward-desc: "1x Daily Key"

gui-items:
  constant:
    material: DIAMOND
    name: "&b%interval%"
    lore:
      - "&7Earn a reward every &b%interval%&7."
      - ""
      - "&fReward: &a%reward%"
      - "&fType: &bConstant"
  unique:
    material: EMERALD
    name: "&a%interval%"
    lore:
      - "&7Earn a special reward for"
      - "&7hitting a specific milestone."
      - ""
      - "&fReward: &a%reward%"
      - "&fType: &aUnique"
    achieved:
      material: LIME_WOOL
      name: "&aAchieved - %interval%"
      lore:
        - "&7You've already achieved this reward."
        - ""
        - "&fReward: &a%reward%"
        - "&fType: &aUnique"
  per-session:
    material: GOLD_INGOT
    name: "&6%interval%"
    lore:
      - "&7Come back every day and"
      - "&7play for at least &b%interval%&7!"
      - ""
      - "&fReward: &a%reward%"
      - "&fType: &6Per-session"
    achieved:
      material: LIME_WOOL
      name: "&aAchieved - %interval%"
      lore:
        - "&7You've already achieved this reward."
        - ""
        - "&fReward: &a%reward%"
        - "&fType: &6Per-session"
 
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:

Reviews »
The plugin received a
FULL recode on 2.0.0.

Please consider that when viewing
older reviews. Thank you.​
Resource Information
Author:
----------
Total Downloads: 7,882
First Release: Jul 31, 2017
Last Update: Yesterday at 1:23 AM
Category: ---------------
All-Time Rating:
10 ratings
Find more info at discord.gg...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings