# 📈 Economy

The economy system in VortexPluginCore allows you to create and manage multiple currencies, including **money** and **tokens**. It integrates with **Vault** and supports custom economy configurations with flexible transaction settings.

**Features**

* **Multiple Economies** – Supports different types of currencies (e.g., Money, Tokens).
* **Vault Integration** – If Vault is installed, the plugin overrides Essentials Economy.
* **Custom Commands & Messages** – Define balance commands, aliases, and messages for each economy.
* **Player Transactions** – Players can check balances and send currency to others.
* **Admin Controls** – Manage economies via in-game commands.

**Commands**

* `/balance` (`/bal`) – Check your money balance.
* `/token` (`/tokens`) – Check your token balance.
* `/pay <player> <amount>` – Send money to another player.
* `/eco give <player> <amount>` – Add currency to a player’s balance.
* `/eco take <player> <amount>` – Remove currency from a player’s balance.
* `/vpc economy delete <economy>` – Delete an economy from the database.

**Configuration (`config.yml`)**

The economy system is fully configurable. Here’s how you can customize it:

```yaml
Settings:
  Toplist Size: 10
  Toplist Update Interval: 10 # In minutes

Economies:
  money:
    Allow Pay: true
    Command: 'balance'
    Aliases:
      - 'bal'
    Messages:
      Balance: '&7Your balance: &a<amount>'
      Sent: '&7You sent &a<amount> &7to &a<target>'
      Received: '&7You received &a<amount> &7from &a<sender>'
    Name: 'Money'
    Prefix: '$'
    Suffix: ''
    Default: 0

  token:
    Allow Pay: true
    Command: 'token'
    Aliases:
      - 'tokens'
    Messages:
      Balance: '&7You have &a<amount> &7token(s).'
      Sent: '&7You sent &a<amount> Token(s) &7to &a<target>'
      Received: '&7You received &a<amount> Token(s) &7from &a<sender>'
    Name: 'Token'
    Prefix: ''
    Suffix: ''
    Default: 0
```

**Explanation of Config Options:**

* `Toplist Size` – Number of players displayed in economy leaderboards.
* `Toplist Update Interval` – How often (in minutes) the leaderboard refreshes.
* **Economy Settings:**
  * `Allow Pay` – Enables/disables player-to-player transactions.
  * `Command` – The main command to check balance.
  * `Aliases` – Alternative command names.
  * `Messages` – Customizable messages for balance checks and transactions.
  * `Prefix/Suffix` – Formatting for displaying currency.
  * `Default` – The starting balance for new players.

**Vault & Essentials Compatibility**

If **Vault** is installed, the "money" economy will become the default Vault economy provider, overriding Essentials Economy. To prevent conflicts, disable these Essentials commands:

```yaml
- money
- balance
- bal
- eco
- balancetop
- baltop
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.vortexdevelopment.net/projects/vortexprisoncore/economy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
