Displays the playtime of the player viewing the placeholder.
Code (Text):
%playtime_<name>_playtime%
Displays the playtime of the specified player.
Code (Text):
%playtime_top_<spot>_name%
Displays up to the top 10 spots username.
Code (Text):
%playtime_top_<spot>_time%
Displays up to the top 10 spots playtime.
Code (Text):
%playtime_playtime_weeks%
Displays the weeks of the playtime of the player viewing the placeholder.
Code (Text):
%playtime_playtime_days%
Displays the days of the playtime of the player viewing the placeholder.
Code (Text):
%playtime_playtime_hours%
Displays the hours of the playtime of the player viewing the placeholder.
Code (Text):
%playtime_playtime_minutes%
Displays the minutes of the playtime of the player viewing the placeholder.
Code (Text):
%playtime_playtime_weeks_no_label%
Displays the weeks of the playtime (without any label) of the player viewing the placeholder.
Code (Text):
%playtime_playtime_days_no_label%
Displays the days of the playtime (without any label) of the player viewing the placeholder.
Code (Text):
%playtime_playtime_hours_no_label%
Displays the hours of the playtime (without any label) of the player viewing the placeholder.
Code (Text):
%playtime_playtime_minutes_no_label%
Displays the minutes of the playtime (without any label) of the player viewing the placeholder.
Configurable files »
Code (Text):
# config.yml
settings:
# Which time units to display in formatted playtime.
# Valid units: day, hour, minute, second.
# Comment out 'second' if you don't want seconds to appear.
Time-Format-Units:
- day
- hour
- minute
- second # comment this out if you don't want seconds
# What labels to use for each unit.
# These strings are appended to the number of days, hours, etc.
Time-Formats:
Day: " day"
Hour: " hour"
Minute: " minute"
Second: " second"
# Whether to automatically append an "s" to the labels when plural (e.g., "2 days" instead of "2 day").
Append-Formats-With-An-S: true
Rewards-Cleared:
# When an admin clears a player's rewards, should the player be informed in chat?
Tell-Target-All-Their-PlayTime-Rewards-Were-Cleared: true
Use-existing-playtime: true
# Use the data found in the world file for the players data that provides a playtime for the player.
# With this disabled, PlayTime uses its internal system that starts tracking upon the plugin being installed.
update-check:
# Automatically check for plugin updates on SpigotMC.
enabled: true
# Permission required to see the update notification.
permission: playtime.update
# Message shown to admins when an update is available.
# Placeholders: %latest% = latest version, %current% = your version.
message: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &fA new version, &b%latest%&f, is available. You're running &e%current%&f."
guis:
Top:
# Title of the GUI that shows the top playtimes.
Title: '&fᴛᴏᴘ &bᴘʟᴀʏᴛɪᴍᴇꜱ'
# How many players to display in the Top Playtimes GUI.
How-Many-Players-To-Display-In-The-GUI: 10
# How to format each player's name line in the Top GUI.
# Placeholders: %position% = rank number, %player% = player name.
Players-Name: '&b#%position% &7» &b%player%'
# How to format the playtime shown for each player in the Top GUI.
# Placeholder: %playtime% = formatted playtime.
Players-Playtime: '&7%playtime%'
Rewards:
# Title of the GUI that shows available and claimed rewards.
Title: '&bᴘʟᴀʏᴛɪᴍᴇ &fʀᴇᴡᴀʀᴅꜱ'
Code (Text):
# messages.yml
prefix: "&bᴘʟᴀʏᴛɪᴍᴇ &e♦ &f"
messages:
playtime:
self:
- "%prefix%&fYou've played for &b%playtime%&f."
- "%prefix%&fTimes Joined: &b%joins%"
- "%prefix%&fFirst Joined: &b%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."
not-found:
- "%prefix%&cNo &fplaytime data found for &b%target%&f."
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:
material: DIAMOND
name: "&b%interval%"
lore:
- "&7Earn a reward every &b%interval%&7."
- ""
- "&fReward: &a%reward%"
- "&fType: &bConstant"
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"
permissions-required: []
# Unique rewards are given ONCE when total playtime reaches the threshold.
unique:
one_day:
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"
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"
permissions-required:
- playtime.rewards.unique1
- playtime.rewards.rank1
# 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:
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: &aUnique"
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"
permissions-required:
- playtime.rewards.per-session1
- playtime.rewards.rank1