> 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/features/streaks.md).

# Daily Login Streaks

Logging in on the calendar day right after the last one extends a player's streak by 1; missing a day resets it back to 1. "Calendar day" uses `timezone` (and `period-reset.daily`) from `config.yml` — the same boundary the daily playtime counter uses.

```yaml
streaks:
  enabled: true
```

## Viewing streaks

* `/xtimerewards streak` (or `/daily` / `/dailystreak`) — opens the streak menu (`menus/streak.yml`) if `playtime-menu.enabled` is on, otherwise prints current/longest streak in chat.
* `/xtimerewards streaktop [page]` — the current-streak leaderboard (`menus/streak-top.yml`).

## Streak tiers (`streaks.yml`)

```yaml
streaks:
  - 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: loyalty-bonus
    days: 30
    repeat: true
    display-name: "<yellow>Loyalty Bonus"
    icon: BEACON
    rewards:
      - type: economy
        value: "1000"
```

| Field                            | Meaning                                                                                                                                                                                                                    |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                             | Unique identifier.                                                                                                                                                                                                         |
| `days`                           | The streak length (in consecutive days) this tier grants at.                                                                                                                                                               |
| `repeat`                         | `false` (default) = grants exactly once, the day the streak first reaches `days`. `true` = grants again every `days`, for as long as the streak keeps growing (e.g. `days: 30, repeat: true` grants at day 30, 60, 90...). |
| `display-name` / `icon` / `lore` | Same as milestones — shown in the reward-granted chat line and the `/daily` menu.                                                                                                                                          |
| `rewards`                        | Same reward-entry format as [milestones](/home/xtimerewards/features/playtime-and-milestones.md#reward-types), plus `streak-freeze-item` (below).                                                                          |

Streak tiers grant automatically the moment they're reached — there's no manual claim step.

## Streak Freeze

A banked freeze charge is spent automatically the next time a player would otherwise miss a day, preserving their streak instead of resetting it — silent unless it actually triggers (a chat message confirms it did, naming days remaining).

Charges are earned via the `streak-freeze-item` reward type (in `streaks.yml` or `milestones.yml`):

```yaml
rewards:
  - type: streak-freeze-item
    amount: 1
```

This gives a **physical, consumable item** rather than crediting the charge directly — right-clicking it banks 1 charge and consumes the item. `material`/`name`/`lore` are optional on the reward entry; omitting them (as above) falls back to `config.yml`'s shared default:

```yaml
streaks:
  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
```

{% hint style="info" %}
The default material is a throwable (**SNOWBALL**) rather than a placeable block or plain item, deliberately. A block-type item only ever sends a right-click packet to the server when a block is actually in reach to place against — with nothing targeted, the client never tells the server at all, so the item would silently do nothing in open air. A throwable or consumable (food/potion) always reaches the server regardless of what's being looked at. Whichever material you pick, the plugin cancels the resulting vanilla action automatically (nothing is actually thrown/eaten/placed) — only the freeze charge is banked.
{% endhint %}

### Custom crafting recipe (optional)

```yaml
streaks:
  freeze-item:
    craft:
      enabled: false
      shape:
        - "PPP"
        - "PSP"
        - "PPP"
      ingredients:
        P: PAPER
        S: SNOWBALL
      result-amount: 1
```

Off by default. When enabled, registers a shaped crafting-table recipe producing the exact same freeze item as a reward or `/xtimerewards admin streak freeze give` (tagged identically, so right-clicking it works the same either way). `shape` is up to 3 rows of up to 3 symbols; a space means "empty slot". Re-registered on `/xtimerewards admin reload`, so you can tweak it live.

## Admin management

`/xtimerewards admin streak <set|add|remove|reset> <player> <days>` edits a player's current streak directly. `/xtimerewards admin streak freeze <set|add|remove> <player> <amount>` edits banked charges directly; `/xtimerewards admin streak freeze give <player> [amount]` instead hands over the physical item for the player to bank themselves. See [Commands](/home/xtimerewards/reference/commands.md) for full syntax and [Permissions](/home/xtimerewards/reference/permissions.md).

## Placeholders & Discord

See [PlaceholderAPI](/home/xtimerewards/reference/placeholderapi.md) for `%xtimerewards_streak%`, `%xtimerewards_streak_longest%`, `%xtimerewards_streak_freezes%` and the `%xtimerewards_top_streak_*%` family. A genuine new personal-best streak (not just tying it) can also post a Discord embed — see [Discord Integration](/home/xtimerewards/features/discord.md).


---

# 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/features/streaks.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.
