# Permissions and commands

This page documents all commands (and their respective permissions when applicable). Permissions that are not associated with a command can be found [here](#additional-permissions).

## /ar check

Check the progress of yourself or another player on a path.

#### Variations

| Command                        | Explanation                                                     |
| ------------------------------ | --------------------------------------------------------------- |
| /ar check                      | Check all the paths you're on                                   |
| /ar check `path name`          | Check progress of a path `path name`                            |
| /ar check `player name`        | Check all the paths `player name` is on                         |
| /ar check `player` `path name` | Check the progress of player `player name` for path `path name` |

#### Permissions

| Permission             | Explanation                                     |
| ---------------------- | ----------------------------------------------- |
| `autorank.check`       | Allows a player to check their own paths.       |
| `autorank.checkothers` | Allow a player to check paths of other players. |

## /ar leaderboard

Check the leaderboard to see who's got the most play-time.

#### Variations

| Command                            | Explanation                                                                          |
| ---------------------------------- | ------------------------------------------------------------------------------------ |
| /ar leaderboard                    | Check the leaderboard of all-time                                                    |
| /ar leaderboard `daily`            | Check the leaderboard for the daily times.                                           |
| /ar leaderboard `weekly`           | Check the leaderboard for the weekly times.                                          |
| /ar leaderboard `monthly`          | Check the leaderboard for the monthly times.                                         |
| /ar leaderboard `total`            | Check the leaderboard of all-time                                                    |
| /ar leaderboard `type` `broadcast` | Check the leaderboard of a certain type and broadcast to all players that are online |
| /ar leaderboard `type` `force`     | Check the leaderboard of a certain type and force it to update.                      |

#### Permissions

| Permission                       | Explanation                                                                |
| -------------------------------- | -------------------------------------------------------------------------- |
| `autorank.leaderboard`           | Allows a player to view the leaderboard.                                   |
| `autorank.leaderboard.force`     | Allows a player to force the leaderboard to update.                        |
| `autorank.leaderboard.broadcast` | Allows a player to broadcast the leaderboard to all players of the server. |

## /ar help

Get a list of commands that you can perform. Note that when the option 'show help command based on permission' is enabled, Autorank will only show you the commands you have access to.

#### Variations

| Command         | Explanation                                 |
| --------------- | ------------------------------------------- |
| /ar help        | Shows the first page of a list of commands. |
| /ar help `page` | Shows page `page` of a list of commands.    |

## /ar set

Set the play-time of a player.

#### Variations

| Command                      | Explanation                                             |
| ---------------------------- | ------------------------------------------------------- |
| /ar set `player name` `time` | Set the time of player `player name` to `time` minutes. |

#### Permissions

| Permission     | Explanation                                 |
| -------------- | ------------------------------------------- |
| `autorank.set` | Allows a player to perform the set command. |

## /ar add

Add play-time to a player's current play-time.

#### Variations

| Command                      | Explanation                                 |
| ---------------------------- | ------------------------------------------- |
| /ar add `player name` `time` | Add `time` minutes to player `player name`. |

#### Permissions

| Permission     | Explanation                                                         |
| -------------- | ------------------------------------------------------------------- |
| `autorank.add` | Allows a player to add time to another player (including themself). |

## /ar remove

Remove play-time from a player's current play-time.

#### Permissions

| Permission        | Explanation                                    |
| ----------------- | ---------------------------------------------- |
| `autorank.remove` | Allows a player to perform the remove command. |

#### Variations

| Command                         | Explanation                                      |
| ------------------------------- | ------------------------------------------------ |
| /ar remove `player name` `time` | Remove `time` minutes from player `player name`. |

## /ar gcheck

Check the global play-time of yourself or another player.

#### Variations

| Command                  | Explanation                                    |
| ------------------------ | ---------------------------------------------- |
| /ar gcheck               | Check your global play-time                    |
| /ar gcheck `player name` | Check global play-time of player `player name` |

#### Permissions

| Permission             | Explanation                                                |
| ---------------------- | ---------------------------------------------------------- |
| `autorank.gcheck`      | Allows a player to check their own global time.            |
| `autorank.checkothers` | Allows a player to check the global time of other players. |

## /ar reload

Reload the configuration files of Autorank.

#### Variations

| Command    | Explanation                                 |
| ---------- | ------------------------------------------- |
| /ar reload | Reload the configuration files of Autorank. |

#### Permissions

| Permission        | Explanation                                    |
| ----------------- | ---------------------------------------------- |
| `autorank.reload` | Allows a player to perform the reload command. |

## /ar import

Import play-time from a flat-file. Make sure you have your files to be imported (Total*time.yml, Daily\_time.yml, etc.) in the **imports** folder of the Autorank folder. Note that you can also combine parameters of this command. This means you can use the command like this:* /ar import --overwrite-flatfile --db\_.

#### Variations

| Command                           | Explanation                                                                                                                                                     |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /ar import                        | Import flat-file storage to your local storage. If there is already time stored in your local storage, it will add them together.                               |
| /ar import `--db`                 | Import flat-file storage to your local storage **and** global storage. Imported times will be added together with already existing times.                       |
| /ar import `--db-only`            | Import flat-file storage to your **global** storage (MySQL database) and not to your local storage. It will add the imported time to the already existing time. |
| /ar import `--overwrite-flatfile` | Import flat-file storage to your local storage only and overwrite the current values that are in your local storage.                                            |
| /ar import `--overwrite-db`       | Import flat-file storage to your local and global storage, but only overwrite your global storage and *add* to your local storage.                              |
| /ar import `--overwrite-all`      | Import flat-file storage to your local and global storage and override the current values in both the local and global storage.                                 |

#### Permissions

| Permission        | Explanation                                    |
| ----------------- | ---------------------------------------------- |
| `autorank.import` | Allows a player to perform the import command. |

## /ar archive

Archive old play-time entries below a certain threshold.

#### Variations

| Command            | Explanation                                                                 |
| ------------------ | --------------------------------------------------------------------------- |
| /ar archive `time` | Remove the entries of players that have less play-time than `time` minutes. |

#### Permissions

| Permission         | Explanation                                     |
| ------------------ | ----------------------------------------------- |
| `autorank.archive` | Allows a player to perform the archive command. |

## /ar debug

Create a debug file that can be given to a developer of Autorank to quickly find out all details about your Autorank set-up.

#### Variations

| Command   | Explanation                                               |
| --------- | --------------------------------------------------------- |
| /ar debug | Creates a debug file in the **debug** folder of Autorank. |

#### Permissions

| Permission       | Explanation                                   |
| ---------------- | --------------------------------------------- |
| `autorank.debug` | Allows a player to perform the debug command. |

## /ar sync

Synchronize the global storage (MySQL database) with your local storage (flat-file).

#### Variations

| Command          | Explanation                                                                       |
| ---------------- | --------------------------------------------------------------------------------- |
| /ar sync         | Add time of each player stored in the flat-file and add it to the MySQL database. |
| /ar sync reverse | Add time of each player stored in the MySQL database and add it to the flat-file. |

#### Permissions

| Permission      | Explanation                                  |
| --------------- | -------------------------------------------- |
| `autorank.sync` | Allows a player to perform the sync command. |

## /ar syncstats

Deprecated command. It was used to synchronize data between Stats and Statz, but it does not work anymore.

## /ar complete

Try to complete a requirement of a path.

#### Variations

| Command                  | Explanation                                 |
| ------------------------ | ------------------------------------------- |
| /ar complete `id` `path` | Complete a requirement `id` of path `path`. |

#### Permissions

| Permission          | Explanation                                      |
| ------------------- | ------------------------------------------------ |
| `autorank.complete` | Allows a player to perform the complete command. |

## /ar fcheck

Force a rank-up check on a player.

#### Variations

| Command                  | Explanation                           |
| ------------------------ | ------------------------------------- |
| /ar fcheck `player name` | Force a check on player `player name` |

#### Permissions

| Permission            | Explanation                                        |
| --------------------- | -------------------------------------------------- |
| `autorank.forcecheck` | Allows a player to perform the forcecheck command. |

## /ar track

Track your progress on a specific requirement.

#### Variations

| Command               | Explanation                                           |
| --------------------- | ----------------------------------------------------- |
| /ar track `id` `path` | See your progress on requirement `id` of path `path`. |

#### Permissions

| Permission       | Explanation                                   |
| ---------------- | --------------------------------------------- |
| `autorank.track` | Allows a player to perform the track command. |

## /ar hooks

Check which third-party plugins Autorank is connected to (through PluginLibrary).

#### Variations

| Command   | Explanation                                 |
| --------- | ------------------------------------------- |
| /ar hooks | Check the plugins Autorank is connected to. |

#### Permissions

| Permission       | Explanation                                   |
| ---------------- | --------------------------------------------- |
| `autorank.hooks` | Allows a player to perform the hooks command. |

## /ar gset

Set the global play-time of a player.

#### Variations

| Command                       | Explanation                                                    |
| ----------------------------- | -------------------------------------------------------------- |
| /ar gset `player name` `time` | Set the global play-time of player `player` to `time` minutes. |

#### Permissions

| Permission      | Explanation                                  |
| --------------- | -------------------------------------------- |
| `autorank.gset` | Allows a player to perform the gset command. |

## /ar gadd

Add global play-time to a player.

#### Variations

| Command                       | Explanation                                               |
| ----------------------------- | --------------------------------------------------------- |
| /ar gadd `player name` `time` | Add `time` minutes of global play-time to player `player` |

#### Permissions

| Permission      | Explanation                                  |
| --------------- | -------------------------------------------- |
| `autorank.gadd` | Allows a player to perform the gadd command. |

## /ar view

Check out a path without choosing it. You'll see the prerequisites, requirements and results of that path.

#### Variations

| Command         | Explanation                                                           |
| --------------- | --------------------------------------------------------------------- |
| /ar view `path` | Check out all prerequisites, requirements and results of path `path`. |

#### Permissions

| Permission      | Explanation                                  |
| --------------- | -------------------------------------------- |
| `autorank.view` | Allows a player to perform the view command. |

## /ar choose

Join/choose a path.

#### Variations

| Command           | Explanation         |
| ----------------- | ------------------- |
| /ar choose `path` | Choose path `path`. |

#### Permissions

| Permission        | Explanation                                    |
| ----------------- | ---------------------------------------------- |
| `autorank.choose` | Allows a player to perform the choose command. |

## /ar deactivate

Deactivate a path (if allowed). Note that you may lose your progress if you do so.

#### Variations

| Command               | Explanation             |
| --------------------- | ----------------------- |
| /ar deactivate `path` | Deactivate path `path`. |

#### Permissions

| Permission          | Explanation                                      |
| ------------------- | ------------------------------------------------ |
| `autorank.deactive` | Allows a player to perform the deactive command. |

## /ar times

Show the total, daily, weekly and monthly play-time of a player.

#### Variations

| Command                 | Explanation                           |
| ----------------------- | ------------------------------------- |
| /ar times               | Show your own time statistics.        |
| /ar times `player name` | Show `player name`'s time statistics. |

#### Permissions

| Permission              | Explanation                                          |
| ----------------------- | ---------------------------------------------------- |
| `autorank.times.self`   | Allows a player to check their own time data.        |
| `autorank.times.others` | Allows a player to check time data of other players. |

## /ar reset

Reset the progress of a player.

#### Variations

| Command                                  | Explanation                                                     |
| ---------------------------------------- | --------------------------------------------------------------- |
| /ar reset `player name` `progress`       | Reset the progress of player `player name` on all active paths. |
| /ar reset `player name` `activepaths`    | Remove all active paths of player `player name`.                |
| /ar reset `player name` `completedpaths` | Remove all completed paths of player `player name`.             |

#### Permissions

| Permission       | Explanation                                   |
| ---------------- | --------------------------------------------- |
| `autorank.reset` | Allows a player to perform the reset command. |

## /ar backup

Backup playerdata storage or play-time storage.

#### Variations

| Command                 | Explanation                    |
| ----------------------- | ------------------------------ |
| /ar backup `playerdata` | Backup all playerdata storage. |
| /ar backup `storage`    | Backup all play-time storage.  |

#### Permissions

| Permission                | Explanation                                    |
| ------------------------- | ---------------------------------------------- |
| `autorank.backup.storage` | Allows a player to perform the backup command. |

## /ar info

Show info of a player.

#### Variations

| Command                | Explanation                 |
| ---------------------- | --------------------------- |
| /ar info `player name` | Show info of `player name`. |

#### Permissions

| Permission             | Explanation                                    |
| ---------------------- | ---------------------------------------------- |
| `autorank.info.self`   | Allows a player to view their own info.        |
| `autorank.info.others` | Allows a player to view info of other players. |

## /ar editor

Editor playerdata of a player

#### Variations

| Command    | Explanation                                         |
| ---------- | --------------------------------------------------- |
| /ar editor | Start the editor conversation to adjust playerdata. |

#### Permissions

| Permission                             | Explanation                                                      |
| -------------------------------------- | ---------------------------------------------------------------- |
| `autorank.editor.path.assign`          | Allows a player to assign a path to a player.                    |
| `autorank.editor.path.assign.force`    | Allows a player to assign a path to a player by force.           |
| `autorank.editor.path.unassign`        | Allows a player to unassign a path from a player.                |
| `autorank.editor.complete.path`        | Allows a player to complete a path of a player.                  |
| `autorank.editor.complete.requirement` | Allows a player to complete a requirement of a path of a player. |

## /ar migrate

Migrate player data from another plugin into Autorank.

#### Variations

| Command     | Explanation                       |
| ----------- | --------------------------------- |
| /ar migrate | Migrate from a plugin to Autorank |

#### Permissions

| Permission         | Explanation                                   |
| ------------------ | --------------------------------------------- |
| `autorank.migrate` | Allows a player to use the migration command. |

## Additional permissions

Some permissions are not associated with a command, but with an action. Hence, these permissions cannot be listed in the previous section. This section provides an overview of these 'left-over' permissions.

#### Permissions

| Permission                     | Explanation                                                                                                                                                                           |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `autorank.exclude`             | A player with this permission cannot check its progress and will not be assigned a path or complete a path automatically. It is different from the `autorank.timeexclude` permission. |
| `autorank.timeexclude`         | A player with permission will not automatically recording play-time. Autorank will not count any time for the player. It is different from the `autorank.exclude` permission.         |
| `autorank.leaderboard.exclude` | A player with permission will not be shown on any leaderboard.                                                                                                                        |
| `autorank.noticeonupdate`      | A player with this permission will be notified when a new version of Autorank is available.                                                                                           |
| `autorank.noticeonwarning`     | A player with this permission will be notified Autorank has detected a warning or error.                                                                                              |
