# Play Time Reward

As with vote rewards, this reward is conditional on a certain number of hours played:

* `required-hours` \[number] - the number of hours required to achieve this reward.
* `tracking` \[text] - Based on what the time played will evolve, options:
  * **LOCAL** (the time played is different for each server)
  * **GLOBAL** (time is calculated cross-server)
* `format` \[text] - The format used in the menu

### Example configuration

{% code fullWidth="true" %}

```yaml
# Decides if rewards will be claimable.
enabled: true
type: play_time_reward
#
# Reward tag
#
tag: Play Time Reward
#
# Permission which player must have to be
# able to obtain this reward.
#
permission: ultimaterewards.examplePlayTime
#
# Required play time (in minutes) to achieve this reward.
#
required-time: 720
# Format that replaces the %requiredTime% placeholder in the rewards menu
format: "%hours% hour(s) %minutes% minute(s)"
#
# Based on what the time played will evolve, options:
#   LOCAL (the time played is different for each server)
#   GLOBAL (time is calculated cross-server)
#
tracking: LOCAL
# NOTE THAT ITEM & SOUND NAMES ARE SLIGHTLY DIFFERENT BETWEEN >1.12 & 1.13< VERSIONS!
# SO MAKE SURE YOU ARE USING VALID ITEM NAMES (DEFAULT ONE ARE USED FROM 1.13+ VERSIONS)
# OTHERWISE WILL BE REPLACED BY STONE IF INVALID NAME IS IN USE.
#
# When player achieves required play time,
# this version of reward item is displayed in the inventory:
#
available-item: "LIME_DYE"
available-display-name: "&a&lPLAY TIME REWARD"
available-lore:
  - "&7You have played"
  - "&7enough time to be able"
  - "&7obtain this reward!"
  - " "
  - "&b► Click to claim!"
#
# Whereas player doesn't have enough played time,
# this version of reward item is displayed in the inventory:
#
unavailable-item: "RED_DYE"
unavailable-display-name: "&c&lPLAY TIME REWARD"
unavailable-lore:
  - "&7You need to spend enough"
  - "&7hours to be able obtain"
  - "&7this reward!"
  - " "
  - "&4► Requires another %requiredHours% hours"
#
# When player has already claimed this reward:
#
claimed-item: "GRAY_DYE"
claimed-display-name: "&7&lPLAY TIME REWARD"
claimed-lore:
  - "&7You have already"
  - "&7claimed this reward"
  - "&7for %hours% hours!"
#
# When player doesn't have permission for this reward,
# the following properties will be shown.
#
no-permission-item: BARRIER
no-permission-display-name: "&c&l&mDAILY REWARD #1"
no-permission-lore:
  - "&c ✕ Locked, requires"
  - "&c   %permission% permission"
#
# Commands list that will be executed after player
# obtains this reward.
# All available actions can be found at
# https://revivalo.gitbook.io/ultimaterewards/
#
# Format: () - optional value | [] - required value
#   [<actionType>] (<chance>):<command>
#
# Examples:
#   - [console] 50:give %player% diamond 1
#       - this command will have a 50%
#         execution chance due to its property value
#
#   - [message] "&aYou have claimed your %type% reward!"
#       - this action will send the player a message
#         with the defined content
#
# You can also use the random placeholders
# from the randoms.yml file and use them in commands.
# Example:
#   - give %player% iron_ingot %exampleRandom%
#       - the placeholder will be replaced by
#         a random number from the defined interval in randoms.yml
#
actions:
  - '[console] give %player% diamond 1'
  - '[console] say %player% claimed his %type% reward!'
  #  - '[actionbar] &aSuccessfully claimed!' # Action bar can be used only from 1.12 versions!
  - '[title] &aClaimed'
  - '[subtitle] &aReward %type%'
  - '[sound] BLOCK_CHEST_OPEN'


```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ultimaterewards.athelion.eu/configuration/rewards/reward-types/play-time-reward.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
