# Configuration

### Configuration

Use this page to manage the main VxCoinflip settings.

Edit the config files carefully.

Reload or reload after changes if required by your setup.

### Config files

Document the files used by VxCoinflip here.

Typical files include:

<details>

<summary>Config.yml</summary>

```yaml
storage:
  # Types available: MYSQL, H2
  type: H2
  host: "localhost"
  port: 3306
  database: "vxcoinflip"
  username: "root"
  password: ""

settings:
  minimum-bet: 1000
  maximum-bet: 1000000
  broadcast-coinflip-creation: false
  minimum-broadcast-winnings: 1000

  tax:
    enabled: true
    rate: 5.0 # 5% tax

  providers:
    default_provider: "VAULT"

    VAULT:
      enabled: true
      display_currency_name: "Money"

    CUSTOM_CURRENCY:
      enabled: false
      display_currency_name: "Coins"
      raw_balance_placeholder: "%vault_eco_balance%" # Requires PlaceholderAPI
      commands:
        withdraw: "eco take {player} {amount}"
        deposit: "eco give {player} {amount}"
```

</details>

<details>

<summary>Lang.yml</summary>

```yaml
messages:
  prefix: "<gradient:#00aeff:#066996>Vortex Coinflip »</gradient> "

  # =========================================
  # GENERAL & ERRORS
  # =========================================
  only-players: "&cYou must be a player to use this command!"
  invalid-amount: "&cThe amount must be a valid number."
  negative-amount: "&cBet amount must be greater than 0!"
  already-have-game: "&c&lERROR! &7You already have an active coinflip!"

  # =========================================
  # ECONOMY
  # =========================================
  not-enough-money: "&cYou do not have enough %currency% to match this wager!"
  not-enough-money-create: "&cYou do not have enough %currency% to create this coinflip!"
  economy-unavailable: "&cEconomy system is unavailable!"
  # =========================================
  # ADMIN MESSAGES
  # =========================================
  reload-success: "&aSuccess! &fAll VxCoinflip configurations have been reloaded."
  no-permission: "&cYou do not have permission to execute this command."
  # =========================================
  # GAME EVENTS
  # =========================================
  game-created: "&aSuccess! &fCreated a coinflip for <gradient:#00aeff:#066996>$%amount%</gradient>."
  game-cancelled: "&7You cancelled your coinflip and were refunded &f$%amount%&7."
  won-game: "&aSuccess! &fYou won <gradient:#00aeff:#066996>$%amount%</gradient> &fagainst &7%player%&f!"
  lost-game: "&cYou lost &4$%amount% &cto &7%player%&c!"

  # =========================================
  # CUSTOM AMOUNT PROMPTS
  # =========================================
  type-custom-amount: "&7Type your custom wager amount in chat, or type &c'cancel' &7to cancel."
  custom-amount-cancelled: "&cCustom amount input cancelled."
  custom-amount-set: "&aSuccess! &fCustom amount set to <gradient:#00aeff:#066996>$%amount%</gradient>."
  broadcast-win: "&d&lWINNER! &d%player% &ajust won a &b%currency% &acoinflip worth &e%amount%&a!"
```

</details>

Example GUI configuration (there are 3 different configurable guis)

<details>

<summary>guis/panel.yml</summary>

```yaml
Title: "&8Coinflip Panel"
Format:
  - "r ~ ~ ~ i ~ ~ ~ r"
  - "~ ~ ~ ~ ~ ~ ~ ~ ~"
  - "~ c c c c c c c ~"
  - "~ c c c c c c c ~"
  - "~ c c c c c c c ~"
  - "r ~ ~ p ~ n ~ g r"

"~":
  Title: " "
  Material: GRAY_STAINED_GLASS_PANE
  Lore: []

# NEW RED GLASS DECORATION
"r":
  Title: " "
  Material: RED_STAINED_GLASS_PANE
  Lore: []

"i":
  Title: "<gradient:#00aeff:#066996>&lCOINFLIP PANEL</gradient>"
  Material: KNOWLEDGE_BOOK
  Lore:
    - "&8COINFLIP"
    - ""
    - "<#00aeff>█ &fCoinflips are a way to gamble"
    - "<#00aeff>█ &fmoney & coins with other players."
    - ""
    - "&a▲ &fWins/Loss: &a%wins%&f/&c%losses% &8(%winrate%%)"
    - "<#00aeff>$ &fProfit: <#00aeff>$%profit%"
    - "&c✦ &fTotal Lost: &c$%total_lost%"
    - "<gradient:#00aeff:#066996>✪ &fTotal Gambled: $%total_gambled%</gradient>"

"c":
  Title: "<#00aeff>%player%"
  Lore:
    - "&8COINFLIP"
    - ""
    - "&a$ &fWager: &a%wager%"
    - "<#00aeff>✦ &fCurrency: <#00aeff>%currency%"
    - ""
    - "&7➜ Click to start coinflip"

"g":
  Title: "<gradient:#00aeff:#066996>&lCREATE A GAME</gradient>"
  Material: NETHER_STAR
  Lore:
    - "&8COINFLIP"
    - ""
    - "<#00aeff>█ &fCreate your own coinflip"
    - ""
    - "&7➜ Click to &f&lCREATE&7 a game"

"empty":
  Title: "&c&lERROR!"
  Material: BARRIER
  Lore:
    - ""
    - "&cThere are no active coinflip games."
    - "&cStart one with &f/coinflip create <amount>"

"p":
  Title: "&7Previous Page"
  Material: ARROW
  Lore: []

"n":
  Title: "&7Next Page"
  Material: ARROW
  Lore: []
```

</details>

### Safe edit flow

{% stepper %}
{% step %}

#### Stop or prepare your server

Avoid editing while active writes are happening.
{% endstep %}

{% step %}

#### Back up the files

Save a copy before changing values.
{% endstep %}

{% step %}

#### Edit one section at a time

Change small pieces first.
{% endstep %}

{% step %}

#### Apply the changes

Reload plugin.
{% endstep %}

{% step %}

#### Test the result

Check logs and confirm the feature works in game.
{% endstep %}
{% endstepper %}


---

# 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://vortexstudio-1.gitbook.io/vortexstudio-docs/vxcoinflip/configuration.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.
