# Leaderboards

<figure><img src="../.gitbook/assets/leaderboards/leaderboards.png" alt="" width="563"><figcaption><p>Editor (Import Example)</p></figcaption></figure>

> **Info:**
A leaderboard is saved in its hologram's own file in the holograms folder, and the tracked values in data/leaderboards.yml.

## Leaderboards

Any hologram can show a top list. The plugin tracks a value for every player, such as kills, play time or a balance, and ranks them by it. A line with a rank shows the player at that rank, and rank lines can sit on any page, between normal lines.

Set a line's type to Leaderboard to show the top list on it. The **Leaderboard** button of any hologram opens the settings below.

## Leaderboard Line

A line with the **Leaderboard** type shows the whole list on its own, one rank per row. **Rows** sets how many ranks it shows, **Own Row** adds the viewer's own place under the list, and **Row Format** replaces the board's format for this line. The leaderboard click actions turn it through the rest of the ranks. All rows share the line's scale and spacing, so use rank lines when a row needs its own click, hover or head.

## Rank Lines

A text or head line gets a rank in its line editor. Rank 1 is the first row of the page of ranks the player is on, so a page with ten rank lines shows ranks 1 to 10, then 11 to 20 once the player turns the ranks with a leaderboard [click action](../main-features/click-actions.md). Each page of the hologram fills its own rank lines. Rank -1 shows the viewer their own place.

A text rank line uses its own Row Format, or the board's when it has none. A head rank line shows the head of the player at that rank, and a plain head while the rank is empty.

## Value Source

What players are ranked by: a statistic, play time, a Vault balance, a PhoenixCurrencies currency, or a PlaceholderAPI placeholder that gives one player's own number. A statistic, the block, item or mob it counts, and a currency are picked from a list. Statistics and play time include offline players from their saved statistics. A placeholder is read from each online player every [sample interval](../configurations/main-configuration.md#leaderboard-sample-interval), so only players who were online since the leaderboard was set up are ranked, under the name they last had. Leaderboards with the same value share their readings. A PhoenixCurrencies leaderboard updates the moment a balance changes and when PhoenixCurrencies refreshes its own leaderboards, with nothing to set up.

<figure><img src="../.gitbook/assets/leaderboards/value-source.png" alt="" width="563"><figcaption><p>Leaderboard (Value Source)</p></figcaption></figure>

## Period

| Period | Ranks by |
| ------ | -------- |
| All Time | The value itself. |
| Daily, Weekly, Monthly, Yearly | How much the value went up since the period started. Players who gained nothing are left out. |

<figure><img src="../.gitbook/assets/leaderboards/period.png" alt="" width="563"><figcaption><p>Leaderboard (Period)</p></figcaption></figure>

A period starts at the [reset time](../configurations/main-configuration.md#leaderboard-reset-time), weeks on the [week start](../configurations/main-configuration.md#leaderboard-week-start) day, in the plugin's [time zone](../configurations/main-configuration.md#time-zone).

Entries with a score of 0 or below never show, on any period.

## Ranks

How many ranks the board keeps, from 1 to 100. Rank lines page through them.

<figure><img src="../.gitbook/assets/leaderboards/ranks.png" alt="" width="563"><figcaption><p>Leaderboard (Ranks)</p></figcaption></figure>

## Refresh Interval

How many seconds pass between updates of the rank lines, from 1 to 3600. Other lines keep the hologram's Update Interval.

<figure><img src="../.gitbook/assets/leaderboards/refresh-interval.png" alt="" width="563"><figcaption><p>Leaderboard (Refresh Interval)</p></figcaption></figure>

## Row Text

The look of the rank lines: the options below.

<figure><img src="../.gitbook/assets/leaderboards/row-text.png" alt="" width="563"><figcaption><p>Leaderboard (Row Text)</p></figcaption></figure>

## Row Format

How a filled rank line looks when it has no format of its own, with `{rank}`, `{name}`, `{value}`, `{me}` and `{head}`.

<figure><img src="../.gitbook/assets/leaderboards/row-format.png" alt="" width="563"><figcaption><p>Row Text (Row Format)</p></figcaption></figure>

## Empty Row Format

How a rank with nobody looks, with `{rank}`.

<figure><img src="../.gitbook/assets/leaderboards/empty-row-format.png" alt="" width="563"><figcaption><p>Row Text (Empty Row Format)</p></figcaption></figure>

## Your Rank Line

How your rank lines show each viewer their own place, with `{rank}`, `{name}` and `{value}`. A viewer who is not ranked sees `-` and `0`.

<figure><img src="../.gitbook/assets/leaderboards/your-rank-line.png" alt="" width="563"><figcaption><p>Row Text (Your Rank Line)</p></figcaption></figure>

## Own Row Marker

The text `{me}` shows on the row of the player who is looking at the board, `« you` by default. Other viewers see nothing in its place.

<figure><img src="../.gitbook/assets/leaderboards/own-row-marker.png" alt="" width="563"><figcaption><p>Row Text (Own Row Marker)</p></figcaption></figure>

## Thousands Separator

Groups large values, such as 342,131. Empty shows plain numbers.

<figure><img src="../.gitbook/assets/leaderboards/thousands-separator.png" alt="" width="563"><figcaption><p>Row Text (Thousands Separator)</p></figcaption></figure>

## Decimals

How many decimals the values show, from 0 to 6. Unset keeps the default number formatting.

## Enable Bypass

Leaves out of this board every player with the `phoenixholograms.leaderboard.bypass` [permission](../plugin-information/permissions.md#leaderboard-permission). The check is refreshed while the player is online. Off by default.

## Excluded Players

Player names, not case sensitive, or UUIDs that never show on this board.

```yaml
leaderboard:
  decimals: 2
  enable-bypass: true
  excluded-players:
    - Notch
    - 069a79f4-44e9-4726-a5be-fca90e38aaf5
```

## Player Views

What each player can switch the board to. Every viewer switches on their own.

<figure><img src="../.gitbook/assets/leaderboards/player-views.png" alt="" width="563"><figcaption><p>Leaderboard (Player Views)</p></figcaption></figure>

## Switchable Stats

The stats players can switch between. The first one is the board's own value source and cannot be removed. Each stat has a value source, picked the same way as the board's, and a label players see. Empty labels use the name of the source.

<figure><img src="../.gitbook/assets/leaderboards/switchable-stats.png" alt="" width="563"><figcaption><p>Player Views (Switchable Stats)</p></figcaption></figure>

## Switchable Periods

The periods players can switch between. None keeps the board's own period.

<figure><img src="../.gitbook/assets/leaderboards/switchable-periods.png" alt="" width="563"><figcaption><p>Player Views (Switchable Periods)</p></figcaption></figure>

## Click to Switch

Left-clicking the hologram shows the next stat and right-clicking it the next period, with no click actions to set up. Lines with click actions of their own keep them.

<figure><img src="../.gitbook/assets/leaderboards/click-to-switch.png" alt="" width="563"><figcaption><p>Player Views (Click to Switch)</p></figcaption></figure>

## Add Title Line

Adds a line at the top of the page you are on that shows each viewer the stat and period they are looking at, such as Kills - Today.

<figure><img src="../.gitbook/assets/leaderboards/add-title-line.png" alt="" width="563"><figcaption><p>Player Views (Add Title Line)</p></figcaption></figure>

Source: https://www.phoenixplugins.com/docs/phoenix-holograms/features/leaderboards