> For the complete documentation index, see [llms.txt](https://esmp-fun.gitbook.io/plugins/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://esmp-fun.gitbook.io/plugins/markdown-guide/writing-pages/for-each-player.md).

# Pages for each player

A page can greet each reader by name, show live numbers, and hide parts from players who shouldn't see them.

## Values

Write a name between double curly brackets:

```markdown
Welcome, {{player.name}}! There are {{server.online}} players online.
```

| Value               | Shows                               |
| ------------------- | ----------------------------------- |
| `{{player.name}}`   | The reader's name                   |
| `{{player.world}}`  | The world they're in                |
| `{{player.uuid}}`   | Their Minecraft ID                  |
| `{{server.online}}` | How many players are online         |
| `{{server.max}}`    | The most players that can be online |
| `{{server.name}}`   | Your server's name                  |

**Your own values** go in `config.yml` under `variables`, and work the same way. Change one there and every page that uses it changes with it:

```yaml
variables:
  discord: "discord.gg/emerald"
```

```markdown
Join us on {{discord}}!
```

**PlaceholderAPI** placeholders work too, when PlaceholderAPI is installed:

```markdown
You have {{papi:%vault_eco_balance%}} coins.
```

A name the plugin doesn't know stays on the page exactly as you wrote it, so a typo shows up instead of leaving a gap.

## Parts only some players see

```markdown
{% if permission:emerald.staff %}
> [!NOTE]
> Staff see this box: promote players with /rank set.
{% endif %}
```

Players without the permission don't see anything between the two lines. Write `{% else %}` between them for what everyone else sees instead. The `{% %}` lines go on lines of their own.

Other ways to decide:

| Write                       | Shown when                                    |
| --------------------------- | --------------------------------------------- |
| `{% if permission:x %}`     | The reader has permission `x`                 |
| `{% if season == winter %}` | A value is `winter`                           |
| `{% if season != winter %}` | A value isn't `winter`                        |
| `{% if shop_open %}`        | A value is set and isn't `false`, `no` or `0` |
| `{% if !shop_open %}`       | The other way round                           |

## Lists

Go through a list from `config.yml`, one line each:

```yaml
lists:
  ranks:
    - "Settler"
    - "Builder"
    - "Legend"
```

```markdown
{% for rank in ranks %}
- {{rank}}, number {{loop.index}} of {{loop.count}}
{% endfor %}
```

There is also a list called `server.players` with everyone online.

## Another page's text

A line with only this on it is replaced with the text of another page:

```markdown
{{include:shared-footer}}
```

Handy for something every page ends with. The included page's own `---` settings are left out.

{% hint style="info" %}
Anything inside `code` or a \`\`\` block is shown as written, so a page can explain these tags without them being used.
{% endhint %}
