> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rpg-leveling.zuxaw.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Commands

> Player and admin commands for the RPG Leveling plugin.

# Commands

## Permissions

**`/lvl gui`**, **`/lvl info`**, and **`/level … gui` / `info`** have **no** permission check-every player can use them.

**`/classes`**, every admin **`/lvl`** subcommand, and each **`xprateboost`** leaf use Hytale’s **`requirePermission`** with the nodes below. Use **`/perm`** (or your permission workflow) to grant them.

* **Players:** Grant **`rpgleveling.command.classes`** to your default group if everyone should open the Classes tab via **`/classes`**.
* **Staff:** Grant individual admin nodes, or use **`rpgleveling.command.*`** for the full admin set (including all **`xprateboost`** subcommands). The constants **`rpgleveling.command.gui`** and **`rpgleveling.command.info`** exist for reference only; the plugin does not enforce them on those commands.
* **`hytale.command.admin`:** If a sender has this permission, **`/lvl info`** lists admin subcommands in the help text (same idea as before for operators).

| Permission                                    | Command                                              |
| --------------------------------------------- | ---------------------------------------------------- |
| *(none)*                                      | `/lvl gui`, `/level gui`, `/lvl info`, `/level info` |
| `rpgleveling.command.classes`                 | `/classes`                                           |
| `rpgleveling.command.setlevel`                | `/lvl setlevel …`                                    |
| `rpgleveling.command.setpoints`               | `/lvl setpoints …`                                   |
| `rpgleveling.command.setreset`                | `/lvl setreset …`                                    |
| `rpgleveling.command.setclasstier`            | `/lvl setclasstier …`                                |
| `rpgleveling.command.addxp`                   | `/lvl addxp …`                                       |
| `rpgleveling.command.reload`                  | `/lvl reload`                                        |
| `rpgleveling.command.syncdb`                  | `/lvl syncdb` (pull/push database progression)       |
| `rpgleveling.command.resetstats`              | `/lvl resetstats …`                                  |
| `rpgleveling.command.resetstatsall`           | `/lvl resetstatsall`                                 |
| `rpgleveling.command.resetall`                | `/lvl resetall`                                      |
| `rpgleveling.command.resetrewards`            | `/lvl resetrewards …`                                |
| `rpgleveling.command.resetrewardsall`         | `/lvl resetrewardsall`                               |
| `rpgleveling.command.xprateboost.all`         | `/lvl xprateboost all …` (alias `xpmult`)            |
| `rpgleveling.command.xprateboost.player`      | `/lvl xprateboost player …`                          |
| `rpgleveling.command.xprateboost.clearall`    | `/lvl xprateboost clearall`                          |
| `rpgleveling.command.xprateboost.clearplayer` | `/lvl xprateboost clearplayer …`                     |
| `rpgleveling.command.xprateboost.stop`        | `/lvl xprateboost stop`                              |

## Player Commands

**`/lvl gui`** and **`/lvl info`** need no permissions. **`/classes`** needs **`rpgleveling.command.classes`** (grant it to your default group if all players should use it).

### `/lvl gui`

Opens the stats management GUI where you can:

* View your current level and experience
* See available stat points
* Allocate stat points to different stats
* View your current stat allocations

**Usage:** `/lvl gui` · **Permission:** none (all players)

### `/lvl info`

Displays comprehensive information about:

* All available stats
* Current stat point value per allocation
* All available commands (player and admin)
* Admin commands (if you have any admin node, `rpgleveling.command.*`, `hytale.command.admin`, or **OP** group)

**Usage:** `/lvl info` · **Permission:** none (all players)

### `/classes`

Opens the RPG Leveling GUI on the **Classes** tab (same mod UI as `/lvl gui`). If the class system is disabled, you get a short error instead of the GUI.

**Usage:** `/classes` · **Permission:** `rpgleveling.command.classes`

***

## Admin Commands

Each command requires the matching **`rpgleveling.command.…`** node (see the [permissions](#permissions) table). Grant **`rpgleveling.command.*`** to give staff the full set.

### `/lvl setlevel <player> <level>`

Sets a player's level directly. This will:

* Set the player to the specified level
* Reset XP to 0
* Set available stat points to **(level − 1) × StatPointsPerLevel** (correct total for that level)
* Clear all allocated stats
* **Remove claimed reward levels** above the new level (so the player can reclaim those rewards when they reach the level again)
* Remove all stat modifiers
* Update the HUD display

**Usage:** `/lvl setlevel PlayerName 50`

| Parameter  | Description                                       |
| ---------- | ------------------------------------------------- |
| `<player>` | Username of the target player (online or offline) |
| `<level>`  | Level to set (1–MaxLevel)                         |

Works for **online and offline** players. Offline players are updated in `universe/players/`; success message shows *(offline)*.

### `/lvl setreset <player> <amount>`

Sets a player's **reset points** (used for the RESET ALL button in the Stats GUI). Reset points can also be earned from level rewards in `LevelRewardsConfig.json`.

**Usage:** `/lvl setreset PlayerName 5`

| Parameter  | Description                                       |
| ---------- | ------------------------------------------------- |
| `<player>` | Username of the target player (online or offline) |
| `<amount>` | Number of reset points to set (0 or more)         |

Works for **online and offline** players. Offline players are updated in `universe/players/`; success message shows *(offline)*.

### `/lvl setpoints <player> <points>`

Sets a specific player's **available stat points** directly.

**Usage:** `/lvl setpoints PlayerName 100`

| Parameter  | Description                                       |
| ---------- | ------------------------------------------------- |
| `<player>` | Username of the target player (online or offline) |
| `<points>` | Number of available stat points to set            |

Works for **online and offline** players. Offline players are updated in `universe/players/`; success message shows *(offline)*.

### `/lvl setclasstier <player> <class> <tier>`

Sets a player's **class tier** (0–4) for a specific class. Useful for testing or granting tier progress without kills. Argument order matches other admin commands (player first).

**Usage:** `/lvl setclasstier Zuxaw archery 4`

| Parameter  | Description                                                    |
| ---------- | -------------------------------------------------------------- |
| `<player>` | Username of the target player (online or offline)              |
| `<class>`  | Class id, case-insensitive (e.g. `archery`, `Arcane`, `Heavy`) |
| `<tier>`   | Tier to set (0–4)                                              |

Works for **online and offline** players. Offline players are updated in `universe/players/`; success message shows *(offline)*. Requires the class system to be enabled.

### `/lvl addxp <player> <xp>`

Adds experience points to a specific player. This will:

* Add the specified XP amount
* Automatically handle level ups if enough XP is gained
* Award stat points on level up
* Update the HUD display
* Send level up notifications

**Usage:** `/lvl addxp PlayerName 500.5`

| Parameter  | Description                                    |
| ---------- | ---------------------------------------------- |
| `<player>` | Username of the target player (must be online) |
| `<xp>`     | Amount of XP to add (must be > 0)              |

Add XP only works for **online** players (in-memory store).

### `/lvl xprateboost` (alias: `/lvl xpmult`)

Each **`xprateboost`** / **`xpmult`** subcommand has its own permission (see [permissions](#permissions)); grant **`rpgleveling.command.*`** to allow all of them.

Applies an **extra XP multiplier** on top of config (`RateExp`, zone rates, etc.) for a **limited time in seconds**. Affects XP from **mob kills**, **mining / woodcutting**, and **any `RPGLevelingAPI.addXP` call** except the admin **`COMMAND`** source used by `/lvl addxp` (manual add-xp stays exact).

* **Config first, then timed boost (multiply, don’t add):** The server computes XP using **`RateExp`**, **`ZoneRateExp`**, and the rest of the formulas **first**. The timed boost then **multiplies that result**. So if **`RateExp` is already 3** and you run **`xprateboost all 2 …`**, each award is **3 × 2 = 6×** compared to the same situation with **`RateExp` 1** and **no** timed boost - **not** “3 + 2 = 5×”. The same idea applies together with zone multipliers: every config/zone factor is baked into the amount **before** the timed multiplier.
* **Global + per-player stack:** if both are active, the effective factor is **global × personal** (e.g. global ×2 and personal ×1.5 ⇒ ×3).
* **Runtime only:** boosts are not saved to disk; they are lost on server restart.
* **Per-player by name:** resolves **online** players first, then **offline** records from player files (same idea as other admin commands). If the player is offline when you set a boost, it still applies when they are online during the remaining duration.
* **Player-facing event title:** When **`EnableNotification`** is on in **`RPGLevelingConfig.json`**, starting **`all`** shows the same kind of **large on-screen title** as a level-up to **every online player** (subtitle explains server-wide boost and duration). Starting **`player`** shows that title **only to the target** if they are **online** (offline targets still get the boost when they play, but no title at grant time). When the **timer runs out** naturally, a **second** large title goes to the same audience (**everyone** for a global boost, **only that player** for a personal boost) to say the boost **has finished**. **`clearall`**, **`clearplayer`**, and **`stop`** cancel those end timers so players are **not** notified when an admin ends a boost early.

| Subcommand      | Usage                                                     | Description                                                                                                                                                                              |
| --------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **all**         | `/lvl xprateboost all <multiplier> <seconds>`             | Multiplier for **everyone** (e.g. `2` = double XP from affected sources).                                                                                                                |
| **player**      | `/lvl xprateboost player <player> <multiplier> <seconds>` | Multiplier for **one** player (by username).                                                                                                                                             |
| **clearall**    | `/lvl xprateboost clearall`                               | Removes the **global** timed boost (if any).                                                                                                                                             |
| **clearplayer** | `/lvl xprateboost clearplayer <player>`                   | Removes the **per-player** timed boost for that user (if any).                                                                                                                           |
| **stop**        | `/lvl xprateboost stop`                                   | Stops **everything** at once: clears the **global** boost **and** all **per-player** boosts. Use this to end an event immediately. If nothing is active, you get a short notice instead. |

**Limits (defaults):** multiplier between **0.01** and **1000**; duration **1** to **604800** seconds (7 days). Running **all** or **player** again **replaces** the previous boost of that type for the same scope.

**Examples:**

* Double XP for the whole server for one hour: `/lvl xprateboost all 2 3600`
* Triple XP for one player for 10 minutes: `/lvl xprateboost player Steve 3 600`
* End server-wide event early: `/lvl xprateboost clearall`
* End **all** boosts (global + every personal multiplier): `/lvl xprateboost stop`

### `/lvl reload`

Reloads all config files from disk so that changes take effect without restarting the server. Reloads:

* **ZoneLevelConfig.json** - zone levels and entity overrides
* **InstanceLevelConfig.json** - instance levels and entity overrides
* **LevelRewardsConfig.json** - level rewards (items and reset points)
* **MessagesLanguageMapping.json** - messages and translations
* **RPGLevelingConfig.json** - main plugin config (max level, XP, HUD, etc.)
* **StatsLevelConfig.json** - stats (points per level, stat caps, etc.)
* **DatabaseConfig.json** - database sync settings (in-memory only; DB connection changes require restart)

**Usage:** `/lvl reload`

### `/lvl resetstats <player>`

Resets a player's allocated stats. This will:

* Clear all allocated stat points
* Return all allocated points to the available stat points pool
* Remove all stat modifiers
* Allow the player to reallocate their points

**Usage:** `/lvl resetstats PlayerName`

| Parameter  | Description                                       |
| ---------- | ------------------------------------------------- |
| `<player>` | Username of the target player (online or offline) |

Works for **online and offline** players. Offline players are updated in `universe/players/`; success message shows *(offline)*.

### `/lvl resetstatsall`

Resets **only allocated stats** for **all players**, both **online and offline**. Level and XP are **not** changed. For each player:

* All **allocated stat points** are cleared
* **Available stat points** are set to **(level − 1) × StatPointsPerLevel** (from `StatsLevelConfig.json`)
* Stat modifiers are removed; Health/Stamina etc. are clamped to base

Use this when you want everyone to reallocate their stats (e.g. after a stat rebalance) without resetting levels or XP.

**Usage:** `/lvl resetstatsall` - no arguments. Reports how many online and offline players were updated.

### `/lvl resetall`

Resets **level and stats for all players**, both **online and offline**. Each affected player is set to:

* Level **1**, **0** XP

* **0** available stat points, all allocated stats cleared

* **Claimed reward levels** cleared

* **Reset points** set to **0**

* **Online players:** Updated in-memory (Store/Holder); Hytale persists on save.

* **Offline players:** Updated by modifying their JSON files in `universe/players/`, same as the leaderboard.

**Usage:** `/lvl resetall` - no arguments. Reports how many online and offline players were reset.

### `/lvl resetrewards <player>`

Clears **only** which level rewards the player has **marked as claimed** in `PlayerLevelData` (`ClaimedRewardLevels`). They can open the Stats GUI **Rewards** tab and claim again for levels they already reached.

* Does **not** remove items, reset points, or XP already granted by past claims.
* Does **not** change level or allocated stats.

**Usage:** `/lvl resetrewards PlayerName`

| Parameter  | Description                                                                       |
| ---------- | --------------------------------------------------------------------------------- |
| `<player>` | Username (online or offline; case-insensitive match against offline player files) |

**Offline:** The player JSON under `universe/players/` is updated; success line includes *(offline)*. Same pattern as `/lvl resetstats`.

### `/lvl resetrewardsall`

Clears **claimed level reward flags** for **every** player, **online and offline**. Level, XP, stats, and reset points are **unchanged**. Use after changing `LevelRewardsConfig.json`, fixing mistaken claims, or testing.

**Usage:** `/lvl resetrewardsall` - no arguments. Reports how many **online** and **offline** player records were updated.

The `/level` alias applies to these commands (e.g. `/level resetrewardsall`).
