> For the complete documentation index, see [llms.txt](https://docs.xandtech.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xandtech.fr/home/xtimerewards/reference/configuration-files.md).

# Default Configuration Files

Full contents of every top-level config file XTimeRewards ships by default, for reference. These are generated the first time the plugin starts (see [Installation & Setup](/home/xtimerewards/getting-started/getting-started.md)) — copy from here if you ever need to restore a default.

{% hint style="info" %}
Language files (`lang/*.yml`) and the `menus/*.yml` GUI files aren't included here since they aren't tuned the same way — see [Installation & Setup](/home/xtimerewards/getting-started/getting-started.md#language) for languages and [Menus & GUI Customization](/home/xtimerewards/features/menus.md) for menus.
{% endhint %}

## config.yml

```yaml
# XTimeRewards configuration.

# en_US or fr_FR (or any locale file you add under plugins/XTimeRewards/lang/).
language: en_US

# If true, each player sees messages in their client's own locale when a matching
# lang/<locale>.yml file exists (falls back to `language` above otherwise).
per-player-locale: false

# Prefix prepended to prefixed chat messages. MiniMessage / legacy hex both work.
prefix: "<gradient:#8fe3a8:#2f8a55>[XTimeRewards]</gradient> "

# Extra command names, on top of the built-in ones that always work no matter what's set here
# (/xtimerewards, /xtr, /afk, /daily). Rename or add to these freely — e.g. replace "playtime"
# with "timerewards" below to make /timerewards work instead (or as well). Takes effect on a
# plugin/server restart only — NOT covered by /xtimerewards admin reload, since dynamic command
# registration only happens once, at startup.
commands:
  main-aliases: [ "playtime" ]
  afk-aliases: []
  daily-aliases: [ "dailystreak" ]

# Timezone used to compute daily/weekly/monthly/yearly period boundaries.
# "SERVER" uses the machine's local timezone, or set an IANA zone id, e.g. "Europe/Paris".
timezone: SERVER

# When each resettable period rolls over — affects playtime buckets, milestone progress,
# leaderboards (/top, /streaktop) and leaderboard-rewards.yml distributions all at once, since
# they all share the same period key. Defaults below reproduce the plugin's original behavior
# exactly (midnight/Monday-midnight/1st-midnight/Jan-1-midnight) — only change what you need.
period-reset:
  daily:
    hour: 0
    minute: 0
  weekly:
    day: MONDAY
    hour: 0
    minute: 0
  monthly:
    day: 1
    hour: 0
    minute: 0
  yearly:
    month: 1
    day: 1
    hour: 0
    minute: 0

# Checks GitHub for a newer plugin release (once on startup, then again every check-interval-hours)
# and, if one exists, notifies every online admin (xtimerewards.admin) in chat with a link — never
# downloads or installs anything itself.
update-checker:
  enabled: true
  check-interval-hours: 12

storage:
  # YAML, SQLITE or MYSQL.
  type: SQLITE

  mysql:
    host: localhost
    port: 3306
    database: xtimerewards
    username: root
    password: ""
    use-ssl: false
    pool-size: 10

# Only takes effect when storage.type is MYSQL — every server sharing the same database
# contributes to the same totals/leaderboards/claims.
cross-server: true

tracking:
  # How often (in seconds) online players' playtime is flushed to storage and milestones evaluated.
  interval-seconds: 30
  # How long (in seconds) YAML leaderboard scans are cached for before rescanning.
  top-refresh-seconds: 30

playtime-menu:
  # If true, running /playtime (or /xtimerewards) with no arguments opens the fully customizable
  # GUI defined in menus/playtime.yml instead of printing a plain text summary.
  enabled: true
  # How often (in seconds) every open menu's live content refreshes.
  refresh-seconds: 1

sounds:
  enabled: true
  click:
    sound: UI_BUTTON_CLICK
    volume: 1.0
    pitch: 1.0
  claim-success:
    sound: ENTITY_PLAYER_LEVELUP
    volume: 1.0
    pitch: 1.3
  claim-fail:
    sound: ENTITY_VILLAGER_NO
    volume: 1.0
    pitch: 1.0
  milestone-locked:
    sound: ENTITY_VILLAGER_NO
    volume: 1.0
    pitch: 0.7

claim:
  close-menu-on-claim: true
  totem-effect: true

afk:
  enabled: true
  timeout-seconds: 300
  pause-playtime: true
  track-afk-playtime: true

  notify:
    enabled: true
    chat:
      enabled: true
      message: "<gray>You are now <yellow>AFK</yellow>. Move to become active again.</gray>"
    bossbar:
      enabled: false
      message: "<yellow>⏸ AFK</yellow> <gray>— move to stop</gray>"
      color: YELLOW
      overlay: PROGRESS
      progress: 1.0
    title:
      enabled: true
      title: "<yellow>AFK</yellow>"
      subtitle: "<gray>Move to become active again</gray>"
    actionbar:
      enabled: false
      message: "<yellow>⏸ You are AFK</yellow> <gray>({afk_session})</gray>"

  effects:
    particle:
      enabled: false
      type: PORTAL
      count: 6
      offset-x: 0.3
      offset-y: 0.6
      offset-z: 0.3
    glow:
      enabled: true

afk-mode:
  enabled: true
  teleport:
    world: world
    x: 0.5
    y: 100.0
    z: 0.5
    yaw: 0.0
    pitch: 0.0
  increment-legacy-afk-counter: false
  daily-cap-seconds: 0
  hide-players: true

streaks:
  enabled: true

  freeze-item:
    material: SNOWBALL
    name: "<aqua>❄ Streak Freeze"
    lore:
      - "<gray>Right-click to bank a freeze charge."
      - "<gray>Protects your streak through one missed day."
    glow: false

    craft:
      enabled: false
      shape:
        - "PPP"
        - "PSP"
        - "PPP"
      ingredients:
        P: PAPER
        S: SNOWBALL
      result-amount: 1

info-paper:
  playtime:
    material: PAPER
    name: "<yellow>ℹ Playtime Rewards Info"
    lore:
      - "<gray>Earn rewards by playing!"
      - "<gray>Check the milestones grid below"
      - "<gray>for what's available and required."
  streak:
    material: PAPER
    name: "<aqua>ℹ Streak Rewards Info"
    lore:
      - "<gray>Log in every day to build your streak."
      - "<gray>Missing a day resets it to 1 — unless"
      - "<gray>you have a Streak Freeze banked."

alt-detection:
  enabled: true

leaderboard-rewards:
  enabled: true
  check-interval-seconds: 60

  broadcast:
    enabled: true
    top-count: 5

discord:
  enabled: false
  webhook-url: ""
  username: "XTimeRewards"
  avatar-url: ""
  embed-color: 0x2F8A55

  events:
    leaderboard:
      enabled: true
      top-count: 3
      title: "🏆 {category} Leaderboard — {period} Results"
      line: "#{rank} {player} — {value}"

    milestone:
      enabled: false
      title: "⭐ Milestone Reached!"
      description: "{player} just reached the milestone \"{milestone}\"!"

    streak-record:
      enabled: false
      minimum-days: 7
      title: "🔥 New Streak Record!"
      description: "{player} just reached a new personal best: {streak} day(s) in a row!"
```

## milestones.yml

```yaml
daily:
  - id: daily_30m
    display-name: "<green>30 minutes today"
    required-seconds: 1800
    auto-claim: true
    icon: PAPER
    rewards:
      - type: message
        value: "<green>Thanks for playing 30 minutes today!"

  - id: daily_2h
    display-name: "<green>2 hours today"
    required-seconds: 7200
    auto-claim: true
    icon: BOOK
    lore:
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - 2x Diamond"
    rewards:
      - type: item
        material: DIAMOND
        amount: 2
        name: "<aqua>Daily Bonus Diamonds"
        lore:
          - "<gray>Awarded for 2 hours of playtime today."
      - type: message
        value: "<gold>+2 diamonds for 2h of playtime today!"

weekly:
  - id: weekly_5h
    display-name: "<green>5 hours this week"
    required-seconds: 18000
    auto-claim: true
    icon: CLOCK
    lore:
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - $200"
    rewards:
      - type: economy
        value: "200"

  - id: weekly_vip_bonus
    display-name: "<gold>Weekly VIP Bonus"
    required-seconds: 18000
    required-permission: xtimerewards.milestone.vipbonus
    auto-claim: false
    icon: DIAMOND
    lore:
      - ""
      - "<gray>Exclusive bonus for VIP members."
      - "<gray>Thank you for supporting the server!"
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - $500"
    rewards:
      - type: economy
        value: "500"
      - type: message
        value: "<gold>Thanks for your VIP support!"

monthly:
  - id: monthly_20h
    display-name: "<green>20 hours this month"
    required-seconds: 72000
    auto-claim: false
    icon: CHEST
    lore:
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - 1x Netherite Ingot"
      - "<gray> - $1000"
    rewards:
      - type: item
        material: NETHERITE_INGOT
        amount: 1
        name: "<gold>Monthly Dedication Ingot"
      - type: economy
        value: "1000"

yearly:
  - id: yearly_100h
    display-name: "<gold><bold>100 hours this year"
    required-seconds: 360000
    auto-claim: false
    icon: BEDROCK
    lore:
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - $5000"
    rewards:
      - type: economy
        value: "5000"
      - type: message
        value: "<gold><bold>Thanks for your loyalty this year!"
```

## streaks.yml

```yaml
streaks:
  - id: day-3
    days: 3
    display-name: "<green>3-Day Streak"
    icon: GOLD_NUGGET
    lore:
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - $50"
    rewards:
      - type: economy
        value: "50"

  - id: day-7
    days: 7
    display-name: "<gold>7-Day Streak"
    icon: NETHER_STAR
    lore:
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - $150"
      - "<gray> - 5x Diamond"
    rewards:
      - type: economy
        value: "150"
      - type: item
        material: DIAMOND
        amount: 5

  - id: day-14
    days: 14
    display-name: "<aqua>14-Day Streak"
    icon: EMERALD_BLOCK
    lore:
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - $400"
      - "<gray> - 1x Streak Freeze (right-click to bank it)"
    rewards:
      - type: economy
        value: "400"
      - type: streak-freeze-item
        amount: 1

  - id: day-30
    days: 30
    display-name: "<light_purple>30-Day Streak"
    icon: DIAMOND_BLOCK
    lore:
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - $1000"
    rewards:
      - type: economy
        value: "1000"

  - id: loyalty-bonus
    days: 30
    repeat: true
    display-name: "<yellow>Loyalty Bonus"
    icon: BEACON
    lore:
      - "<gray>Every 30 days, for as long as the streak lasts."
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - $1000"
    rewards:
      - type: economy
        value: "1000"
```

## leaderboard-rewards.yml

```yaml
leaderboards:
  - category: playtime
    period: weekly
    broadcast:
      header: "<gold><bold>🏆 Weekly Playtime — Top players:"
      line: "<yellow>#{rank} <white>{player} <gray>played <green>{value}<gray> this week"
    ranks:
      - rank: 1
        display-name: "<gold>👑 #1 This Week"
        rewards:
          - type: economy
            value: "1000"
          - type: message
            value: "<gold>🏆 You finished #1 on this week's playtime leaderboard! +$1000"
      - rank: "2-3"
        display-name: "<gray>Top 3 This Week"
        rewards:
          - type: economy
            value: "300"
          - type: message
            value: "<green>You finished in the top 3 on this week's playtime leaderboard! +$300"

  - category: streak
    period: weekly
    ranks:
      - rank: 1
        display-name: "<aqua>❄ #1 Streak This Week"
        rewards:
          - type: economy
            value: "500"
          - type: message
            value: "<aqua>❄ You had the longest login streak this week! +$500"
```

## afk-mode-rewards.yml

```yaml
rewards:
  - id: cash-per-minute
    interval-seconds: 60
    repeat: true
    display-name: "<green>$10"
    icon: GOLD_NUGGET
    lore:
      - "<gray>Every minute in AFK mode."
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - $10"
    rewards:
      - type: economy
        value: "10"

  - id: points-5min
    interval-seconds: 300
    repeat: false
    display-name: "<gold>10 Points"
    icon: NETHER_STAR
    lore:
      - "<gray>Once, after 5 minutes."
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - 10 Points"
    rewards:
      - type: command
        value: "points give %player% 10"

  - id: diamonds-20min
    interval-seconds: 1200
    repeat: true
    display-name: "<aqua>3 Diamonds"
    icon: DIAMOND
    lore:
      - "<gray>Every 20 minutes in AFK mode."
      - ""
      - "<yellow>REWARDS:"
      - "<gray> - 3x Diamond"
    rewards:
      - type: item
        material: DIAMOND
        amount: 3

surprise-items:
  enabled: false
  min-interval-seconds: 90
  max-interval-seconds: 300
  visible-seconds: 20
  items:
    - id: bonus-cash
      display-name: "<gold>✦ Surprise Cash!"
      icon: GOLD_INGOT
      weight: 3
      lore:
        - "<gray>Click quickly to claim!"
      rewards:
        - type: economy
          value: "50"

    - id: bonus-diamond
      display-name: "<aqua>✦ Surprise Diamond!"
      icon: DIAMOND
      weight: 1
      lore:
        - "<gray>Click quickly to claim!"
      rewards:
        - type: item
          material: DIAMOND
          amount: 1
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.xandtech.fr/home/xtimerewards/reference/configuration-files.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
