# 📁 Main Configuration

> **Info:**
Changes made by hand in config.yml apply with /pshop reload, except the Internal Pool Size and the Database settings, which need a restart. The console names any of those that changed. Options changed from the editor are saved straight away.

## General Configuration

* **Internal Pool Size** - The number of threads the plugin keeps for its own background work, such as database reads. The default of `10` suits almost every server.
* **Debug** - Adds verbose logging to the console, useful when reporting an issue.
* **Notify If New Version** - Whether the console and players with `phoenixshop.admin` are told when a newer build is out, and admins are offered the changelog after an update.
* **Send Server Statistics** - Lite only. Sends the server version, software, join domains and player count to our servers so the server shows on the website. See [Server Statistics](../plugin-information/licensing.md#server-statistics).
* **Error Reports** - Sends errors thrown by the plugin's own code to us so we can fix them without asking for your logs: the error and its stack trace, the plugin, server and Java versions, and your plugin list. Player names, UUIDs, IP addresses and your server's folder path are removed first, and each kind of error is sent once with a count. On by default on Premium and off on Lite.

```yaml
performance:
  internal-pool-size: 10
debug: false
notify-if-new-version: true
send-server-statistics: true
error-reports: true
```

Update notices, and on Lite the Premium reminder admins see on join, can also be turned off from **Editor > Settings > General**.

## Database

Transactions, stock counts and restock timers are stored in the database. The available types are sqlite, mysql and mariadb.

```yaml
database:
  type: sqlite
  address: localhost
  name: phoenixshop_db
  port: 3306
  username: phoenixuser
  password: phoenixpassword
  table-prefix: ps
  jdbc-url-options: createDatabaseIfNotExist=true&useSSL=false&characterEncoding=UTF-8
```

`jdbc-url-options` is added to the MySQL or MariaDB connection URL. Change it when your database host needs other options, such as `allowPublicKeyRetrieval=true` for a MySQL 8 user that has no SSL. It takes effect after a restart.

On MySQL and MariaDB the plugin creates its tables in the utf8mb4 character set, so names, lore and messages can hold emoji and any symbol. Tables made in another character set by an older version are converted once at startup, with one console line per table. If a table cannot be converted, a console warning names it.

> **Warning:**
⭐ MySQL and MariaDB are Premium only. The Lite version uses SQLite whatever the type says, prints a warning in the console and leaves your settings in the file untouched.

### Moving from SQLite to MySQL

⭐ Premium only. Your old data stays in `plugins/PhoenixShop/data/database.db` when you switch. To bring it over:

1. Stop the server and set `type` to `mysql` or `mariadb`, with the connection details.
2. Start the server. PhoenixShop creates its empty tables in the new database.
3. Before anyone joins, run `/pshop database import sqlite` from the console.
4. Restart the server when it says it is done.

The import only runs from the console while nobody is online, and nobody can join until the restart. It copies every PhoenixShop table that exists in both databases. If a table in the new database holds data already, it stops and lists those tables; add `confirm` to replace their contents with the SQLite data. Each table is copied in one go, so a table that fails is left as it was and you can run the command again.

## History

How many days a transaction is kept in the database before it is deleted. `0` or less keeps every transaction forever.

```yaml
history:
  keep-days: 7
```

It can also be set from **Editor > Settings > General**.

The history itself can be browsed with /pshop history, and exported with /pshop history export ⭐.

## Undo ⭐

Lets a player reverse their last transaction with /pshop undo, as long as it happened within the window.

```yaml
undo:
  enabled: true
  window-seconds: 30
```

## Player Shops

Chest shops that players build themselves with a sign. Their settings are in chest-shops.yml, not config.yml; the full list is on [Player Shops Settings](../main-features/player-shops/settings.md).

| Option             | Description                                                                                          |
| ------------------ | ---------------------------------------------------------------------------------------------------- |
| **enabled**        | Turns chest shops on or off. While off, nobody can trade on one, the owner included, and none can be made. On Lite, admin shops ignore it. |
| **creation-cost**  | Charged once, in money (Vault), when the shop is made. `0` makes it free.                            |
| **max-per-player** | How many chest shops one player can own. `0` removes the limit.                                      |
| **sign-material**  | The sign placed on new shops, such as `SPRUCE_SIGN` or `SPRUCE_WALL_SIGN`. Any other material falls back to oak, and hanging signs are not supported. |
| **short-prices** | Shows prices of 1,000 and up as `$250k`, `$1.5m` and so on in chat, menus and holograms. Signs always do. |
| **click-confirm** | `enabled` makes the first sign click on a shop ask to click again; `minutes` is how long a confirmed shop trades without asking. |
| **protected-names** | Names only real plugin items may carry; `*` matches anything. Renamed items with these names cannot be sold. |
| **trade-click** ⭐ | `INSTANT` (default) trades the shop's fixed amount on every click, `PROMPT` asks the customer how many to trade. See [Trade Click](../main-features/player-shops/settings.md#trade-click). |
| **teleport** ⭐    | Lets `/chestshop list` and `/chestshop find` teleport to a shop, for players with `phoenixshop.sign.teleport`. |
| **remote-trading** ⭐ | Lets players with `phoenixshop.sign.remote` trade with a shop from `/chestshop list` and `/chestshop find` without walking to it. See [Remote Trading](../main-features/player-shops/settings.md#remote-trading). |

```yaml
enabled: false
creation-cost: 0
max-per-player: 0
sign-material: OAK_SIGN
protected-names: []
short-prices: true
click-confirm:
  enabled: true
  minutes: 5
trade-click: INSTANT
teleport: true
remote-trading: false
```

## Commands

Every command of the plugin except `/phoenixshop`, and of its add-ons: `chest-shop`, `sell`, `auction-house`, and `autosell`, `rotating-shop`, `sell-boosters` and `sell-wands` while that add-on is installed. Each one can be renamed, given other names and have its subcommands renamed, for example into your own language. They can also be changed in game from **Editor > Settings > Commands**, where changes apply right away.

| Option | Description |
| --- | --- |
| **enabled** | Registers the command. Turning it off removes it. |
| **alternative** | The command's name. |
| **aliases** | Other names for the same command. |
| **subcommands** | A new name per subcommand, such as `collect: recoger`. Messages that mention the subcommand use the new name, and the old name keeps working. Permissions do not change. |

```yaml
commands:
  chest-shop:
    enabled: true
    alternative: chestshop
    aliases:
      - cs
    subcommands: {}
  auction-house:
    enabled: true
    alternative: ah
    aliases:
      - auction
      - auctionhouse
    subcommands:
      collect: recoger
```

Changes made in the file apply with /pshop reload. If another plugin already owns one of these names, PhoenixShop takes it over, and that plugin's command stays reachable with its prefix, such as `/worldedit:cs`.

## Settings File

Transactions, menus, locked categories, the IP limit and sign shops are set in settings.yml. See [Settings File](settings-file.md).

## Click Mappings

What each click on an item in a category does. The key is the click and the value is the action.

```yaml
click-mappings:
  LEFT: BUY
  RIGHT: SELL
  SHIFT_LEFT: BUY
  SHIFT_RIGHT: SELL_ALL
```

| Action     | Description                                                     |
| ---------- | --------------------------------------------------------------- |
| BUY        | Opens the buy menu, where the player picks the amount.          |
| SELL       | Opens the sell menu, where the player picks the amount.         |
| BUY\_ONE   | Buys one purchase straight away.                                |
| SELL\_ONE  | Sells one purchase straight away.                               |
| BUY\_STACK | Buys as many purchases as fit in one stack, straight away.      |
| SELL\_ALL  | Sells every matching item the player carries, straight away. Needs `phoenixshop.sell.all`. |
| PREVIEW ⭐ | Opens the [preview](../features/preview.md#preview) of what one purchase gives. Needs `phoenixshop.preview`. |
| NONE       | Does nothing.                                                   |

A click left out of the list does nothing. The keys are Bukkit click types, so `DROP` (Q) and `CONTROL_DROP` (Ctrl + Q) can be mapped too. `MIDDLE` is left out, as the game only sends a middle-click in creative mode. An action name that does not exist is reported in the console and skipped.

`PREVIEW` is not mapped by default. Swap it in for a click to use it, such as `SHIFT_RIGHT: PREVIEW`. On Lite it does nothing and is left out of the item's hint lines.

## Search ⭐

Shops left out of [/pshop search](../features/search.md#search), by identifier.

```yaml
search:
  excluded-shops: []
```

## Restock and Sale Alerts ⭐

How players are told that an item is back or on sale, see [Restock & Sale Alerts](../features/restock-and-sale-alerts.md).

| Option | Description |
| --- | --- |
| **enabled** | Turns restock and sale alerts on or off for everyone. |
| **chat** | Sends the alert in chat. |
| **title** | Shows the alert as a title and subtitle. |
| **sound** | Played with the alert, as `SOUND, volume, pitch`. Empty plays no sound. |

```yaml
alerts:
  enabled: true
  chat: true
  title: true
  sound: 'BLOCK_NOTE_BLOCK_PLING, 1, 1'
```

## Sell

The settings of /sell and the sell menu.

<figure><img src="../.gitbook/assets/sell-command/sell-command.png" alt="" width="563"><figcaption><p>Settings (Sell Command)</p></figcaption></figure>

| Option               | Description                                                                                   |
| -------------------- | --------------------------------------------------------------------------------------------- |
| **shops-whitelisted** | The shops `/sell` sells to. A shop the player cannot open is skipped.                        |
| **sell-on-close**    | Closing the sell menu sells what is in it. When off, the items are given back unless the player confirms. |
| **shulker-boxes**    | `/sell inventory`, `/sell hand` and the sell menu also sell what is inside shulker boxes. See [Shulker Boxes](../main-features/selling/README.md#shulker-boxes). |
| **sounds.sold**      | Played after a sale, as `SOUND, volume, pitch`.                                               |
| **sounds.deny**      | Played when nothing could be sold.                                                            |
| **sold.message**     | Sends the sold message in chat.                                                               |
| **sold.title**       | Shows the sold title, with its fade-in, stay and fade-out in ticks.                           |

```yaml
sell:
  shops-whitelisted:
    - shop
  sell-on-close: true
  shulker-boxes: true
  sounds:
    sold: 'ENTITY_PLAYER_LEVELUP, 1, 1'
    deny: 'BLOCK_NOTE_BLOCK_BASS, 1, 1'
  sold:
    message: true
    title:
      enabled: true
      fade-in: 5
      stay: 40
      fade-out: 10
```

Most of these can also be changed from **Editor > Settings > Sell**.

## Bedrock

How Bedrock players using Geyser or Floodgate see the shops. Every option is explained on [GeyserMC / Bedrock](geysermc-bedrock.md).

```yaml
bedrock:
  forms: true
  input-modes: []
  allow-opt-out: true
  resize-chest-menus: true
  after-transaction: CATEGORY
  confirm-above: 0
  custom-amount: true
  show-balance: true
  sell-form: true
  icons:
    enabled: true
    fallback-url: ""
    head-url: "https://mc-heads.net/head/%texture%"
```

## Currency Symbols

The symbol shown next to each price in the editor's item list. The key is the currency's identifier, and a PlaceholderAPI placeholder can be used as the symbol. A currency with no entry shows its own name.

```yaml
currency-symbols:
  money: "$"
  points: "Points"
  experience: "XP"
  levels: "Levels"
  votepoints: "Vote Points"
```

> **Info:**
There is no list of currencies in this file. The currency of a shop, category or item is picked in the editor and saved in that shop's own file. See [Shop Configuration File](shop-configuration-file.md#currency).

## Messages & Translations

Every message the plugin sends lives in the translation file rather than in config.yml. Editing the wording and silencing a message are on [Languages & Translations](languages.md).

## MiniMessage

On top of the usual `&` colour codes, shop names, item names, lore and menus accept MiniMessage tags for gradients and hex colours. See [Rich Text (MiniMessage)](languages.md#rich-text-minimessage).

Source: https://www.phoenixplugins.com/docs/phoenix-shop/configurations/main-configuration