# Config Overview

CakeProtect uses 4 configuration files, all located in `plugins/CakeProtect/`.

All files support `&#RRGGBB` hex colors and are hot-reloadable with `/ps reload`.

## config.yml

Main plugin settings:

```yaml
# Tier definitions
tiers:
  10x10:
    material: IRON_ORE
    radius: 10
    price: 15000.0
    enabled: true
    show-in-shop: true

# Player limits
limits:
  max-regions-per-player: 5
  max-members-per-region: 20
  max-bans-per-region: 50

# Teleport settings
teleport:
  delay: 3          # seconds (0 = instant)
  cancel-on-move: true

# Border particle visuals
visuals:
  border:
    duration: 10    # seconds
    color-r: 0
    color-g: 255
    color-b: 180
    size: 1.2
    step: 2.0
  greeting:
    enabled: true
    enter-format: "&#FFEA00✨ เข้าสู่พื้นที่ของ &#FFFFFF{owner}"
    leave-format: "&#FF3366👋 ออกจากพื้นที่ของ &#FFFFFF{owner}"

# First join gift
first-join:
  enabled: true
  tier: "10x10"

# Shop
shop:
  enabled: true
  purchase-cooldown: 1000  # ms
```

## database.yml

Database backend selection and connection settings:

```yaml
backend: "SQLITE"   # SQLITE, MYSQL, MARIADB

sqlite:
  file: "data.db"
  journal-mode: "WAL"
  synchronous: "NORMAL"

mysql:
  host: "localhost"
  port: 3306
  database: "cakeprotect"
  username: "root"
  password: ""
  table-prefix: "cp_"
  use-ssl: false
```

## messages.yml

All player-facing messages with placeholders:

* `{player}` — Player name
* `{owner}` — Region owner
* `{tier}` — Tier name
* `{x}`, `{z}` — Coordinates
* `{count}` — Number
* `{price}` — Price amount
* `{name}` — Display name
* `{time}` — Time value

## lore.yml

All GUI item display names and lore with placeholders. Structure:

```yaml
settings:
  info:
    name: "&#00E5FFɪɴꜰᴏʀᴍᴀᴛɪᴏɴ"
    lore:
      - "&#AAAAAAเจ้าของ: &#FFFFFF{owner}"
      - "&#AAAAAAขนาด: &#FFEA00{tier}"
```

## Color Format

* Hex: `&#RRGGBB` (e.g. `&#FF3366`)
* Legacy: `&0`-`&f`, `&l`, `&o`, `&n`, `&m`, `&k`, `&r` (supported but hex preferred)


---

# 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://docs.niendsitekungz.com/configuration/config.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.
