# Clan Rank

### How does it work? <a href="#how-does-it-work" id="how-does-it-work"></a>

Leaders have the ability to create ranks and give them permissions to perform several actions inside the clan. Unlike `/clan trust`, ranks with permissions allows leaders to have a finer control of who can do what. Ex.: A rank can handle invites (`invite` permission), another takes care of moderation (`kick` permission), etc

### Suggested ranks <a href="#suggested-ranks" id="suggested-ranks"></a>

| Ranks          | Description                                   | Permission                                                                                  |
| -------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------- |
| **Coleader**   | Helps take care of the clan                   | `all`                                                                                       |
| **Treasurer**  | Manages the clan's bank account               | `bank.balance`, `bank.deposit`, `bank.withdraw`                                             |
| **Ambassador** | Manages the clan's relations with other clans | `ally.chat`, `ally.add`, `ally.remove`, `rival.add`, `rival.remove`, `war.end`, `war.start` |
| **Recruit**    | A member in trial                             | `stats`, `kills`, `mostkilled`, `rank.list`                                                 |

### Ranks Commands <a href="#ranks-commands" id="ranks-commands"></a>

| Command                                             | Description                                                                  |
| --------------------------------------------------- | ---------------------------------------------------------------------------- |
| `/clan rank create`                                 | Creates a rank with this name                                                |
| `/clan rank setdisplayname [rank] [displayname]`    | Sets the display name of the rank (it can be more than one word and colored) |
| `/clan rank assign (player) (rank)`                 | Assigns a user to a rank                                                     |
| `/clan rank unassign (player)`                      | Unassigns a user from a rank                                                 |
| `/clan rank delete (rank)`                          | Deletes a rank                                                               |
| `/clan rank list`                                   | Lists the clan's ranks                                                       |
| `/clan rank permissions`                            | Lists the available permissions for ranks                                    |
| `/clan rank permissions (rank)`                     | Lists the rank's permissions                                                 |
| `/clan rank permissions add (rank) (permission)`    | Adds a permission to the rank                                                |
| `/clan rank permissions remove (rank) (permission)` | Removes a permission from the rank                                           |

### Available permissions for ranks <a href="#available-permissions-for-ranks" id="available-permissions-for-ranks"></a>

A player can view those permissions in-game using `/clan rank permissions`

| Rank Permission    | Description                       |
| ------------------ | --------------------------------- |
| `ally.add`         | can add an ally                   |
| `ally.remove`      | can remove an ally                |
| `ally.chat`        | can use ally chat                 |
| `bank.balance`     | can view the bank balance         |
| `bank.deposit`     | can deposit money                 |
| `bank.withdraw`    | can withdraw money                |
| `bb.add`           | can add a message to bb           |
| `bb.clear`         | can clear the bb                  |
| `coords`           | can view the clan's coords        |
| `fee.enable`       | can enable the member fee         |
| `fee.set`          | can change the fee value          |
| `home.regroup`     | can regroup the clan              |
| `home.set`         | can set the clan home             |
| `home.tp`          | can tp to the clan home           |
| `invite`           | can invite someone to the clan    |
| `kick`             | can kick someone from the clan    |
| `modtag`           | can modify the clan tag           |
| `rank.displayname` | can modify a rank's display name  |
| `rank.list`        | can list the ranks                |
| `rival.add`        | can add a rival                   |
| `rival.remove`     | can remove a rival                |
| `war.end`          | can end a war                     |
| `war.start`        | can start a war                   |
| `vitals`           | can view the clan's vitals        |
| `stats`            | can view the clan's stats         |
| `kills`            | can view his or other's kills     |
| `mostkilled`       | can view the mostkilled           |
| `description`      | can change the clan's description |
