# Commands

{% hint style="info" %}
While the main command (which will be used in the following text) is`/reward`, you can also use the registered aliase`/rw (also /rws for /rewards)`
{% endhint %}

Permission to access for all commands:

```yaml
ultimaterewards.admin
```

{% hint style="info" %}
Some commands can also be executed from the console
{% endhint %}

## Managing commands

To reload all .yml files of the plugin, use the following command:

<table><thead><tr><th>Command</th><th>Permission</th><th data-hidden></th></tr></thead><tbody><tr><td>/reward reload</td><td>ultimaterewards.reload</td><td></td></tr></tbody></table>

If you changed the backed type to MySQL (or other DB types) you can use this command to import current data from the files:

<table data-header-hidden><thead><tr><th>Command</th><th>Permission</th><th data-hidden></th></tr></thead><tbody><tr><td>/reward import</td><td>ultimaterewards.admin</td><td></td></tr></tbody></table>

## Menu commands

The plugin offers the option to create a main GUI (the name of which will be main can be set in config.yml) and individual sub-menus that may or may not be interconnected.\
\
Command to open main GUI:

### Main menu opening

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/rewards</td><td>ultimaterewards.use</td><td></td></tr></tbody></table>

### Opening specific menu

You can also directly specify which GUI menu to open.

{% hint style="info" %}
All mentioned commands have full support for tab-completion of arguments
{% endhint %}

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/reward open &#x3C;menuName></td><td>ultimaterewards.open</td><td></td></tr><tr><td>/reward open &#x3C;menuName> (&#x3C;player>)</td><td>ultimaterewards.open.others</td><td></td></tr></tbody></table>

## Reward commands

### Claiming reward commands

One of the basic reward commands will be for claiming a certain reward. The command may also include an argument for which player the reward should be claimed for.

{% hint style="info" %}
The optional arguments are wrapped in round brackets
{% endhint %}

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/reward claim &#x3C;rewardName></td><td>ultimaterewards.claim</td><td></td></tr><tr><td>/reward claim &#x3C;rewardName> (&#x3C;player>)</td><td>ultimaterewards.claim.others</td><td></td></tr></tbody></table>

### Show available rewards

Displays all available rewards in the menu where they can be easily and clearly claimed.

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/reward available</td><td>ultimaterewards.available</td><td></td></tr></tbody></table>

### Resetting reward commands

The following command are used to reset the time cooldown of a reward.

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/reward reset &#x3C;player> &#x3C;rewardName></td><td>ultimaterewards.reset</td><td></td></tr></tbody></table>

### Testing reward actions commands

The set reward can be tested by using the command.

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/reward test &#x3C;rewardName></td><td>ultimaterewards.test</td><td></td></tr></tbody></table>

### Reward settings commands

Specific settings can be toggled with the command:

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/reward toggle &#x3C;setting> (&#x3C;player>)</td><td>ultimaterewards.&#x3C;settingName></td><td></td></tr></tbody></table>

## Referral commands

{% hint style="info" %}
You can also use `/ref` aliase
{% endhint %}

### Creating referral command

To create a referral:

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/referral create</td><td>ultimaterewards.referral.create</td><td></td></tr></tbody></table>

### Activating referral command

After creating a custom referral, players can use the following command to activate their referral The referral **code is always the name of the player who created it**. It then adds 1 use to the player who owns the referral and rewards the player who activated the referral (rewards can be set in referrals.yml).

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/referral apply &#x3C;player></td><td>ultimaterewards.referral.apply</td><td></td></tr></tbody></table>

### Resetting player being player referred to

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/referral reset &#x3C;player></td><td>ultimaterewards.admin</td><td></td></tr></tbody></table>

## Vote commands

{% hint style="info" %}
The `/uvote` command has also been registered, in case there is a conflict with a command from another plugin.
{% endhint %}

### Main command

The main command is customizable, for example it can be used to display voting pages. Everything is of course configurable.

<table data-header-hidden data-full-width="false"><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/vote</td><td>ultimaterewards.vote</td><td>/vote proceed</td></tr></tbody></table>

### Proceeding vote command

Vote can be proceeded manualy by:

<table data-header-hidden data-full-width="false"><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/vote proceed &#x3C;player></td><td>ultimaterewards.admin</td><td>/vote proceed</td></tr></tbody></table>

### Resetting number of votes

<table data-header-hidden><thead><tr><th></th><th></th><th data-hidden></th></tr></thead><tbody><tr><td>/vote reset &#x3C;player></td><td>ultimaterewards.admin</td><td></td></tr></tbody></table>
