> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/features/leveling-system.md).

# Leveling System

Ability to create infinite levels

The `levels:` section of `config.yml` defines buyable level tracks. The defaults are `rankup` (mine ranks) and `pickaxe` (pickaxe level), but any number of tracks can be added — each one pays with a currency and runs reward commands. Like currencies, each level track **auto-registers its own commands** at startup (so adding a new track requires a server restart).

## Example

```yaml
rankup:
  bar:
    number-bars: 20
    bar-delimiter-reached: '&e:'
    bar-delimiter-not-reached: '&c:'
  limit: 1000
  currency: rankupblocks
  starting-cost: 100
  increase-cost-by: 400
  level-up-automatic: true
  remove-currency: true
  rewards:
    for-each:
      - "gems give %player% 1"
    for-specific:
      1:
        - "rank 1"
    for-interval:
      every10:
        - "tokens give %player% 1"
  commands:
    main:
      cmd: rankup
      permission: edprison.rankup
      aliases: []
    max:
      enabled: true
      cmd: maxrankup
      permission: edprison.rankup.max
      aliases:
        - "maxrank"
    give:
      enabled: true
      permission: edprison.rankup.give
      cmd: give
    set:
      enabled: true
      permission: edprison.rankup.set
      cmd: set
    remove:
      enabled: true
      permission: edprison.rankup.remove
      cmd: remove
    bal:
      enabled: true
      permission: edprison.rankup.bal
      cmd: bal
```

For example, we create a rankup leveling system which is automatic.\
It has the main functions but the most important is the following: **level-up-automatic**. If it has that option to true, the max command will be disabled and /rankup instead of ranking up, it will display your rankup. If the option is set to false, the max command (/maxrankup, alias /maxrank in this case) will be enabled and /rankup or /rankup \<amount> will level up your rank.

## Options

| Key                                                       | Type    | Description                                                                                                                                                                                            |
| --------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `bar.number-bars`                                         | int     | Segments in the `%edprison_barlevel_<level>%` progress bar.                                                                                                                                            |
| `bar.bar-delimiter-reached` / `bar-delimiter-not-reached` | string  | Characters used for filled / unfilled segments.                                                                                                                                                        |
| `limit`                                                   | number  | Level cap. `0` = unlimited.                                                                                                                                                                            |
| `currency`                                                | string  | Currency that pays for levels (default tracks use the block currencies `rankupblocks` / `pickaxeblocks`).                                                                                              |
| `starting-cost`                                           | number  | Cost of the first level.                                                                                                                                                                               |
| `increase-cost-by`                                        | number  | Cost added per level — level *n* costs `starting-cost + increase-cost-by * (n-1)` (arithmetic progression).                                                                                            |
| `level-up-automatic`                                      | boolean | `true`: levels are bought automatically as soon as the player can afford them while mining; the main command just shows the current level. `false`: players buy levels manually with the main command. |
| `remove-currency`                                         | boolean | Whether the currency is actually deducted when leveling.                                                                                                                                               |
| `rewards.for-each`                                        | list    | Commands executed for **every** level gained.                                                                                                                                                          |
| `rewards.for-specific.<level>`                            | list    | Commands executed when reaching **that exact level**.                                                                                                                                                  |
| `rewards.for-interval.every<N>`                           | list    | Commands executed every N levels (e.g. `every10`).                                                                                                                                                     |
| `commands.*`                                              | section | Same structure as currency commands, plus a `max` command.                                                                                                                                             |

Reward commands support `%player%`, PlaceholderAPI, `if(...)then` conditions and the `[GIVEECO]` / `[PLAYER]` prefixes (see [Actions](/p/features/enchantments/custom-enchantments/actions.md)).

## Generated commands

| Command                            | Behaviour                                                                                                                                                                                   |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/rankup`                          | With `level-up-automatic: true` — shows your current level. With `false` — buys 1 level (or `/rankup <amount>` for several, capped at what you can afford and the level limit).             |
| `/maxrankup`                       | Buys as many levels as affordable. **Only registered when `level-up-automatic: false`** (the `max.enabled` flag exists in the config but registration is governed by `level-up-automatic`). |
| `/rankup give <player> <amount>`   | Grants levels **and runs their rewards** for online targets.                                                                                                                                |
| `/rankup set <player> <amount>`    | Sets the level (no rewards).                                                                                                                                                                |
| `/rankup remove <player> <amount>` | Removes levels.                                                                                                                                                                             |
| `/rankup bal <player>`             | Shows a player's level.                                                                                                                                                                     |

The default `pickaxe` track works the same via `/pickaxe`.

## Prestige-style tracks

There is no separate "prestige" system — a prestige is simply another level track (e.g. add a `prestige:` entry with its own currency, costs and rewards). The generated commands, placeholders, XP bar and action-bar progress all work for any track name.

## Related placeholders

`%edprison_level_<track>%`, `%edprison_costoflevels_<track>_<amount>%`, `%edprison_blockslefttolevel_<track>%`, `%edprison_barlevel_<track>%`, `%edprison_percentlevel_<track>%` — see [PlaceholderAPI](/p/general/placeholderapi.md).
