# Vault

## 🚀 What is Vault?

**Vault** is a Minecraft plugin API that allows plugin developers to easily integrate **Economy, Permissions, and Chat management**. Instead of each plugin needing to create its own system, Vault acts as a **bridge** between plugins, ensuring compatibility across different systems.

With Vault, your server can:

* Handle virtual currency and economy.
* Check and manage player permissions.
* Format chat messages. Including prefixes and suffixes.

Vault itself doesn’t provide an economy or permissions system—it connects your chosen plugins to other plugins that rely on them.

***

## 📚 Configuration

Vault makes it easy to hook into an economy system. Most of the time, you only need to enable the economy, but there are many options you can customize to make your server’s economy work exactly how you want. Below is an explanation of each setting in the `economy` section:

```yaml
economy:
  enabled: true
  name: Spore Economy
  digits: 2
  symbol: $
  spaceAfterSymbol: false
  singularName: Coin
  pluralName: Coins
  symbolBeforeAmount: true
  useThousandSeparator: true
  starterBalance: 100.0
  logging: true
  topMenu: true
  maxPlayers: 250
  paying: true
  balanceFormat: COMPACT
```

***

## 🔹Explanation of Settings

* **enabled:** Turns the economy system on or off. Other plugins cannot use your economy if this is disabled.
* **name:** The display name of your economy. Useful for identification in `/vault-info`.
* **digits:** Controls how many decimal places balances show.
* **symbol & symbolBeforeAmount:** Lets you choose the currency symbol and whether it appears before or after the amount.
* **spaceAfterSymbol:** Adds a space between the currency symbol and number for readability.
* **singularName / pluralName:** Display-friendly currency names. Example: `1 Coin` vs `5 Coins`.
* **useThousandSeparator:** Improves readability of large balances.
* **starterBalance:** Sets how much new players start with.
* **logging:** Records every transaction in console for monitoring or debugging.
* **topMenu:** Changes `/baltop` output to a GUI rather than a text list.
* **maxPlayers:** Limits how many players appear in the baltop GUI to prevent lag.
* **paying:** Enables player-to-player transactions using `/pay`.
* **balanceFormat:** Determines how balances are displayed—plain, decimal, or compact.

***

## 🧑‍💻 Commands

| Command                         | Description                         |
| ------------------------------- | ----------------------------------- |
| /eco add \<player> \<amount>    | Give money to a player              |
| /eco remove \<player> \<amount> | Remove money from a player          |
| /eco set \<player> \<amount>    | Set the money for a player          |
| /ecologs \<player> \[page]      | View the economy logs for a player. |
| /baltop \[page]                 | View the balopt menu/list.          |
| /pay \<player> \<amount>        | Pay money to a player               |
