> For the complete documentation index, see [llms.txt](https://docs.xandtech.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xandtech.fr/home/xplayercurrencies/configuration/default-configuration-files/default-config-yml.md).

# Default config.yml

The exact `config.yml` shipped inside the plugin jar (`plugins/XPlayerCurrencies/config.yml` on first run). See [Global Configuration](/home/xplayercurrencies/configuration/global-config.md) for an explanation of each section.

{% hint style="info" %}
On every startup/`/currencies admin reload`, any top-level section that's missing from your on-disk file (e.g. after updating to a version that added one) is appended automatically, without touching anything you already customized - see the note in [Global Configuration](/home/xplayercurrencies/configuration/global-config.md#config-updates).
{% endhint %}

```yaml
# ============================================================
#                    XPlayerCurrencies
#                     General config
# ============================================================

# Language used for the plugin messages.
# Files available by default: en, fr (in the /plugins/XPlayerCurrencies/lang/ folder)
# You can add your own translations by following the same format.
language: en

# ------------------------------------------------------------
# Commands - the plugin's own commands are registered directly against the server (not fixed
# in plugin.yml), so the main command can be renamed freely. Takes effect on "/currencies
# reload" (or whatever the main command is renamed to) - no restart needed. Per-currency custom
# commands (e.g. "/coins") are configured separately, in each currencies/<id>.yml "command".
# ------------------------------------------------------------
commands:
  # The plugin's main command - handles balance/give/take/set/reset/list/reload/gui/view.
  # Change this to rename "/currencies" to something else entirely, e.g. "money".
  main-command: currencies
  # Extra names that also work for the main command, on top of main-command above.
  main-aliases: [ currency, xpc ]

# ------------------------------------------------------------
# Storage backend - where every player's currency balances are kept.
# ------------------------------------------------------------
storage:
  # Storage type used for player balances.
  # Possible values: YAML, SQLITE, MYSQL
  type: SQLITE

  mysql:
    host: localhost
    port: 3306
    database: xplayercurrencies
    username: root
    password: ""
    useSSL: false
    # Connection pool size (HikariCP)
    pool-size: 10

# ------------------------------------------------------------
# Cross-server real-time sync (optional) - only takes effect when storage.type above is MYSQL.
# When several servers share the same MySQL database (a network), enabling this makes a balance
# change on one server instantly update the in-memory balance of any other server where that
# player happens to be online, via Redis pub/sub - without this, that other server would only
# ever see the change once the player quits and rejoins there. Not needed for a single
# standalone server, and safely ignored (with a warning) if storage.type isn't MYSQL.
# ------------------------------------------------------------
cross-server:
  enabled: false
  redis:
    host: localhost
    port: 6379
    password: ""
    database: 0
    # Redis pub/sub channel name - only needs changing if multiple, unrelated
    # XPlayerCurrencies networks happen to share the same Redis server/database.
    channel: xplayercurrencies:balance-sync

# ------------------------------------------------------------
# Sound feedback for every menu - opening one, clicking a button, and the outcome of an action
# (success/error). This covers everything EXCEPT the shop and bank systems, which have their own
# dedicated sounds configured per currency instead (currencies/<id>.yml "shop.sounds"/
# "bank.sounds") since they can be tuned differently per currency. "enabled" is a single master
# on/off switch - to silence just ONE sound instead of everything, set its own volume to 0 rather
# than disabling the whole section.
# ------------------------------------------------------------
gui-sounds:
  enabled: true
  open:
    sound: UI_TOAST_IN
    volume: 0.7
    pitch: 1.0
  click:
    sound: UI_BUTTON_CLICK
    volume: 0.5
    pitch: 1.2
  success:
    sound: ENTITY_EXPERIENCE_ORB_PICKUP
    volume: 1.0
    pitch: 1.0
  error:
    sound: ENTITY_VILLAGER_NO
    volume: 1.0
    pitch: 1.0

# ------------------------------------------------------------
# Safety net for every BULK sell action - "/currencies sellall" and the sell sticks (see
# currencies/<id>.yml "sell-sticks"). Neither ever touches a material listed here, even if some
# shop happens to buy it - a player's own deliberate single-item sell (right-click in a live shop
# menu) is NEVER affected, only the two bulk actions are. Extend this list with anything your
# server considers too valuable to risk sweeping away by accident.
# ------------------------------------------------------------
sell-protection:
  enabled: true
  blacklist:
    - NETHERITE_INGOT
    - NETHERITE_BLOCK
    - NETHERITE_SCRAP
    - NETHERITE_SWORD
    - NETHERITE_AXE
    - NETHERITE_PICKAXE
    - NETHERITE_SHOVEL
    - NETHERITE_HOE
    - NETHERITE_HELMET
    - NETHERITE_CHESTPLATE
    - NETHERITE_LEGGINGS
    - NETHERITE_BOOTS
    - ELYTRA
    - TOTEM_OF_UNDYING
    - ENCHANTED_GOLDEN_APPLE
    - NETHER_STAR
    - DRAGON_EGG
    - BEACON

# ------------------------------------------------------------
# Sell sticks - physical items (see currencies/<id>.yml "sell-sticks") that sell an ENTIRE
# container's contents when right-clicked on it, instead of opening it. Which block types count
# as a "container" for this purpose - chests and barrels by default; add shulker box colors etc.
# if you want those too (e.g. "WHITE_SHULKER_BOX").
# ------------------------------------------------------------
sell-sticks:
  container-types:
    - CHEST
    - TRAPPED_CHEST
    - BARREL

# ------------------------------------------------------------
# Portable bank - a physical item (currency-agnostic, unlike sell sticks) that opens the bank menu
# when right-clicked, exactly like "/currencies bank" with no currency argument (auto-picks the
# only bank-enabled currency, or shows a picker if several). Hand one out with
# "/currencies admin portablebank give <player> [amount]", or let players craft it themselves with
# "recipe" below. Off by default - turn "enabled" on to allow both giving and crafting it.
# ------------------------------------------------------------
portable-bank:
  enabled: true
  material: ENDER_CHEST
  # A custom player head instead of a plain "material" above - paste a "Value" copied off
  # minecraft-heads.com (or any other base64 Mojang texture blob) here to use it; leave blank
  # ("") to just use "material" as a normal item. Overrides "material" entirely when set.
  custom-head-texture: ""
  name: "&6&lPortable Bank"
  lore:
    - "&7Right-click to open your bank"
    - "&7from anywhere."
  glow: true
  recipe:
    enabled: true
    # 3x3 crafting grid, top to bottom - one character per slot, matching a key under
    # "ingredients" below (any other character, including a space, means an empty slot).
    shape:
      - "GEG"
      - "ECE"
      - "GEG"
    ingredients:
      G: GOLD_INGOT
      E: EMERALD
      C: CHEST

# ------------------------------------------------------------------
# Live on-screen summary of every currently-active earnings booster (global events + your own,
# with remaining time) - see currencies/<id>.yml "booster-potions"/"permission-boosters" and
# "/currencies admin booster event/give". Off by default.
#
# - mode: ACTIONBAR (shares the same on-screen line as other actionbar messages, e.g. kill coins -
#   a periodic refresh can visibly overwrite one, and vice versa) or BOSSBAR (a persistent bar,
#   no such conflict).
# - bossbar-color: only used when mode is BOSSBAR - PINK, BLUE, RED, GREEN, YELLOW, PURPLE, or
#   WHITE.
# ------------------------------------------------------------------
booster-display:
  enabled: true
  mode: BOSSBAR
  bossbar-color: YELLOW

# ------------------------------------------------------------------
# Anti-dupe/exploit detection - watches every INCOME balance change (shop sells, kill coins, bank
# interest, cheque redeems, Vault deposits, etc.) for patterns a legitimate player could never
# produce: too many separate gains too fast, or a single/cumulative gain abnormally large relative
# to a currency's own "max-balance" (currencies/<id>.yml). Trusted admin-issued reasons below are
# never checked. A flagged attempt is broadcast to "notify-permission" and logged like any other
# transaction (see "/currencies admin logs <player>", "Fraud alerts" filter). See also
# "/currencies admin fraud freeze|unfreeze|status <player> <currency>".
# ------------------------------------------------------------------
fraud-detection:
  enabled: true
  # Reasons never checked - admin-issued balance changes and one-time imports are always trusted.
  exempt-reasons:
    - GIVE
    - TAKE
    - SET
    - RESET
    - BANK_ADMIN_GIVE
    - BANK_ADMIN_TAKE
    - BANK_ADMIN_SET
    - BANK_ADMIN_RESET
    - BANK_ADMIN_SET_TIER
    - MIGRATION_IMPORT
  # The sliding time window (seconds) the two rules below look back over.
  window-seconds: 10
  # More than this many separate income transactions within the window = flagged - works for
  # every currency regardless of its own scale, the main defense against a sell/kill-coin macro
  # or packet exploit. Set to -1 to disable.
  max-transactions-per-window: 20
  # A single gain bigger than this % of a currency's own "max-balance" is flagged instantly. Only
  # applies to currencies that actually have a max-balance set - skipped for unlimited ones. Set
  # to -1 to disable.
  max-single-gain-percent: 20
  # Total gains within the window bigger than this % of a currency's "max-balance" is flagged,
  # even if no single gain alone tripped the rule above. Same max-balance requirement/-1 to
  # disable.
  max-cumulative-gain-percent: 50
  # What happens once a rule is tripped:
  # - NOTIFY_ONLY: let the gain through, just alert/log it.
  # - CANCEL: block that one gain, alert/log it, nothing else.
  # - CANCEL_AND_FREEZE: block it AND stop that player earning that currency at all for
  #   "freeze-duration-seconds" - spending and admin actions are never affected, only further
  #   income is refused while frozen.
  action: CANCEL_AND_FREEZE
  freeze-duration-seconds: 300
  # Also kick a player the instant they get frozen (on top of everything above) - off by default,
  # a freeze alone already stops any further gain.
  kick-on-freeze: false
  # Permission that receives the live in-game alert - see "xplayercurrencies.admin.fraud.alerts"
  # in plugin.yml. Always logged to console/the log file too, regardless of who's online.
  notify-permission: xplayercurrencies.admin.fraud.alerts
```

Next: [Currency Basics](/home/xplayercurrencies/configuration/currency-basics.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.xandtech.fr/home/xplayercurrencies/configuration/default-configuration-files/default-config-yml.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
