> For the complete documentation index, see [llms.txt](https://ultimaterewards.athelion.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ultimaterewards.athelion.eu/usage/commands.md).

# Commands

All valid command syntaxes, their arguments and their permissions.

{% hint style="info" %}
Every command name and alias can be renamed in the `commands:` section of [config.yml](/usage/global-configuration.md). This page uses the default names.
{% endhint %}

| Command     | Alias        | Purpose                                                       |
| ----------- | ------------ | ------------------------------------------------------------- |
| `/reward`   | `/rw`        | Main command — opens the main menu and holds all sub-commands |
| `/rewards`  | `/rws`       | Opens the main menu                                           |
| `/referral` | `/ref`       | Referral system                                               |
| `/vote`     | `/uvote`     | Voting                                                        |
| `/playtime` | `/uplaytime` | Play-time                                                     |

{% hint style="success" %}
`ultimaterewards.admin` (and OP) unlocks **every** command on this page. The individual nodes below are only needed when you want to hand out partial access.
{% endhint %}

{% hint style="info" %}
All commands support tab-completion. How arguments are matched while typing is controlled by `tab-argument-matcher` in config.yml.

Optional arguments are wrapped in round brackets `( )`.
{% endhint %}

## Administration

| Syntax                   | Permission               | Description                                            |
| ------------------------ | ------------------------ | ------------------------------------------------------ |
| `/reward reload`         | `ultimaterewards.reload` | Reloads every .yml file of the plugin                  |
| `/reward convert <type>` | `ultimaterewards.admin`  | Copies stored data to another database backend         |
| `/reward about`          | `ultimaterewards.about`  | Version, platform and a list of currently active hooks |
| `/reward help`           | `ultimaterewards.admin`  | Lists every sub-command the sender is allowed to use   |

### Converting the database

When you want to move from SQLite to a real database server (or between servers), run the conversion **while still running on the old backend**:

```
/reward convert MYSQL
```

Valid types are `SQLITE`, `MYSQL`, `MARIADB` and `POSTGRESQL`.

{% hint style="warning" %}
Fill in the credentials of the **target** database in [config.yml](/usage/global-configuration.md) before running the command — the plugin connects to it directly. After a successful conversion, change `backend:` in config.yml and restart the server.
{% endhint %}

## Menu commands

The plugin offers the option to create a main GUI (its name is set by `main-menu` in config.yml) and individual sub-menus that may or may not be interconnected.

| Syntax                           | Permission                    | Description                           |
| -------------------------------- | ----------------------------- | ------------------------------------- |
| `/rewards` or `/reward`          | —                             | Opens the main menu                   |
| `/reward open <menu>`            | `ultimaterewards.open`        | Opens the specified menu              |
| `/reward open <menu> (<player>)` | `ultimaterewards.open.others` | Opens the specified menu for a player |

{% hint style="info" %}
Each menu can also register its own command through the `command:` key in [guis.yml](/configuration/menus/basics.md).
{% endhint %}

## Reward commands

| Syntax                                       | Permission                      | Description                                       |
| -------------------------------------------- | ------------------------------- | ------------------------------------------------- |
| `/reward claim <reward>`                     | —                               | Claims the reward                                 |
| `/reward claim <reward> (<player>)`          | `ultimaterewards.claim.others`  | Claims the reward for another player              |
| `/reward available`                          | `ultimaterewards.available`     | Opens a menu with everything currently claimable  |
| `/reward reset <player> <reward> (<streak>)` | `ultimaterewards.reset`         | Resets a reward (cooldown, streak, claimed state) |
| `/reward test <reward> (<streak\|day>)`      | `ultimaterewards.test`          | Executes the reward's actions without claiming it |
| `/reward toggle <setting>`                   | see below                       | Toggles one of the player's own settings          |
| `/reward toggle <setting> (<player>)`        | `ultimaterewards.toggle.others` | Toggles the setting for another player            |

### Resetting rewards

Besides a player name, `/reward reset` accepts wildcards:

| Argument                     | Meaning                                                |
| ---------------------------- | ------------------------------------------------------ |
| `/reward reset <player> ...` | Resets for that player (works for offline players too) |
| `/reward reset * ...`        | Resets for all **online** players                      |
| `/reward reset ** ...`       | Resets for **every** player in the database            |
| `/reward reset <player> *`   | Resets **all** rewards of that player                  |

The optional `<streak>` argument resets a specific streak step of streak-based rewards.

{% hint style="info" %}
The `*` and `**` player wildcards apply to a single reward at a time — combining them with the `*` reward wildcard only resets the first reward.
{% endhint %}

### Testing rewards

`/reward test` runs the reward's [actions](/configuration/rewards/reward-actions.md) immediately, ignoring cooldowns and checkers, which makes it the fastest way to verify a new configuration. For rewards that have streaks (streak rewards, advent calendar, pickable rewards…) the step has to be specified, e.g. `/reward test exampleStreakReward 3`.

{% hint style="info" %}
This command can only be executed in-game.
{% endhint %}

### Toggling settings

`<setting>` is one of the [reward settings](/configuration/rewards/reward-settings.md): `JOIN_NOTIFICATION`, `LIVE_NOTIFICATIONS`, `JOIN_AUTO_CLAIM`, `LIVE_AUTO_CLAIM`. Toggling a setting requires the permission belonging to that setting — the full list is on the [Reward Settings](/configuration/rewards/reward-settings.md) page.

## Referral commands

| Syntax                     | Permission                        | Description                            |
| -------------------------- | --------------------------------- | -------------------------------------- |
| `/referral`                | —                                 | Shows the referral help from lang.yml  |
| `/referral create`         | `ultimaterewards.referral.create` | Creates the player's own referral code |
| `/referral apply <player>` | `ultimaterewards.referral.apply`  | Activates someone else's referral code |
| `/referral reset <player>` | `ultimaterewards.admin`           | Clears whom the player was referred by |

The referral **code is always the name of the player who created it**. Applying it adds one use to the owner of the referral and rewards the player who applied it. Both sides' rewards, as well as the requirements for creating and applying, are configured in `referrals.yml` — see [Reward Requirements](/configuration/rewards/reward-features/reward-requirements.md).

## Vote commands

{% hint style="info" %}
The `/uvote` alias is registered as well, in case `/vote` conflicts with another plugin.
{% endhint %}

| Syntax                   | Permission              | Description                                                 |
| ------------------------ | ----------------------- | ----------------------------------------------------------- |
| `/vote`                  | —                       | Sends the `vote-command` message list from lang.yml         |
| `/vote proceed <player>` | `ultimaterewards.admin` | Processes a vote for the player manually (useful for tests) |
| `/vote reset <player>`   | `ultimaterewards.admin` | Resets the player's vote counter                            |

Vote handling itself (counting, announcements, per-vote rewards) is configured in [votes.yml](/configuration/rewards/reward-types/per-vote-reward.md).

## Play-time commands

| Syntax                     | Permission              | Description                           |
| -------------------------- | ----------------------- | ------------------------------------- |
| `/playtime reset <player>` | `ultimaterewards.reset` | Resets the player's tracked play-time |

{% hint style="warning" %}
Resetting play-time also resets the progress of every [play-time reward](/configuration/rewards/reward-types/play-time-reward.md) of that player.
{% endhint %}
