# 🔑 Permissions

Tyche uses a granular permission system to ensure total control over who can gamble and who can manage the system. We recommend using LuckPerms for the most reliable experience.

***

#### Quick Reference Table

Use this table for a high-level overview of the available permission nodes.

| **Permission Node** | **Description**                                                  | **Recommended Rank** |
| ------------------- | ---------------------------------------------------------------- | -------------------- |
| `tyche.use`         | Allows access to gambling, GUIs, and basic commands.             | Default / Player     |
| `tyche.admin`       | Full administrative access (Reload, Filters, Cancelling others). | Admin / Owner        |

***

#### Detailed Node Breakdown

**`tyche.use`**

This is the core permission required for any player to interact with the plugin.

* Access to GUIs: Allows opening the Main Menu, the History Menu, and the Leaderboards.
* Gambling: Allows the use of `/itemflip <side> <amount>` to create new wagers.
* Collection: Allows players to open and withdraw items from their personal Collection Bin.
* Utility: Allows viewing the allowed items list via `/fliplist`.

**`tyche.admin`**

The master administrative node. This should be restricted to trusted staff members only.

* Configuration: Allows the use of `/itemflip reload` to refresh the plugin settings.
* Filter Management: Allows opening the `/itemflip filter` menu to whitelist or blacklist specific items.
* Global Moderation: Grants the ability to Force Cancel any active flip in the GUI by right-clicking it, even if the admin did not create the flip.
* Bypass: Admins automatically inherit all `tyche.use` capabilities.

***

#### Staff Helper Nodes

*(Optional: If you decide to add these sub-permissions later, they are listed here for future-proofing.)*

{% hint style="info" %}

Currently, administrative powers are bundled into `tyche.admin`. Granular staff nodes (like `tyche.mod`) are planned for a future update.

{% endhint %}

***

#### Implementation Examples

Copy and paste these commands into your console to quickly configure your ranks using LuckPerms.

For your default players:

Bash

```
/lp group default permission set tyche.use true
```

For your administrative team:

Bash

```
/lp group admin permission set tyche.admin true
```

***

#### Troubleshooting Permissions

If a player has the permission but still cannot use a command:

1. Check Parentage: Ensure they aren't in a group where the permission is explicitly set to `false`.
2. Reloading: After changing permissions in LuckPerms, ensure you run `/lp sync` or wait for the auto-refresh.
3. OP Status: By default, anyone with OP (Operator) status is granted `tyche.admin`.
