# :icon-gear: Configuration

* * *

#### 

**config.yml**

### Language

```yaml
language: 'en'
```

Available options: `en` (English), `fr` (French). Custom language files can be placed in the `languages/` folder.

* * *

#### 

### Database

```yaml
database:
  type: 'sqlite'                # 'sqlite' or 'mysql'/'mariadb'
  host: 'localhost'             # MySQL only
  port: 3306                    # MySQL only
  database: 'premiumadvancements' # MySQL only
  username: 'root'              # MySQL only
  password: ''                  # MySQL only
```

* * *

#### 

### Webhook (Global Toggle)

```yaml
webhook:
  enabled: false                # Master switch for all Discord webhooks
  url: ""                       # Discord webhook URL
  vanilla:
    enabled: false              # Send webhooks for vanilla Minecraft advancements
  namespaces:                   # (v2.6+) Filter webhooks by namespace
    enabled: true               # When true, only allowed namespaces send webhooks
    allowed:                    # List of namespace prefixes
      - "minecraft:"            # Default: only vanilla advancements
      # - "default"             # Uncomment to also include custom tab "default"
```

* * *

#### Vanilla Advancement Broadcast (v2.6+)

Control how vanilla Minecraft advancement completions are announced in chat.

```yaml
vanilla-advancements:
  enabled: true                 # Enable the default global broadcast message
  message: "&e%player% &6has made the advancement &a%advancement%"
```

| Setting | Description |
|---------|-------------|
| `enabled` | When `true`: uses the global default message below. When `false` + no per-advancement override: vanilla handles the message normally. Per-advancement overrides set via `/padv gui` → vanilla tab **always work regardless** of this toggle. |
| `message` | Default broadcast format for all vanilla advancements. Supports all formatting: `&#RRGGBB`, `<color:#RRGGBB>`, `<gradient:A:B>`, `<rainbow>`, `&` codes, MiniMessage. PlaceholderAPI placeholders (`%hexnicks_nick_mm%`) are also supported. Uses `%player%`, `%advancement%`, `%description%` placeholders. |

!!!secondary **Per-advancement Overrides**
Via `/padv gui` → click a vanilla tab → click an advancement, you can set a custom
broadcast message for that specific advancement. These overrides are stored in
`vanilla-messages.yml` and work independently of the global `enabled` toggle.
!!!

* * *

### Progression Display

```yaml
progression:
  show-actionbar: true          # Show progress in action bar
```

When `false`, all action bar messages are suppressed globally and the action bar toggle in the creation/edit GUI is disabled.

* * *

#### 

### Vanilla Tab Order

```yaml
vanilla-tab-order:
  story: 1
  nether: 2
  end: 3
  adventure: 4
  husbandry: 5
```

Defines the display order of built-in Minecraft advancement tabs in the `TabSelectorGUI`. Edit these values to reorder vanilla tabs among your custom tabs. Custom tabs use the **Tab Position** field from the web editor or `tabOrder` in their YAML file. Changes survive plugin reload.

* * *

#### 

### Web Editor

```yaml
editor:
  enabled: true                 # Enable/disable the web editor
  api-url: "https://api.skyxnetwork.net"
  editor-url: "https://skyxnetwork.net/editor"
  debug: false                  # Enable verbose editor logs
```

* * *

#### 

### Metrics

```yaml
metrics:
  enabled: true                 # bStats metrics (ID: 28395)
```

* * *

#### 

**Timezone (v2.5+)**

```yaml
timezone: 'UTC'                 # IANA timezone ID (e.g., 'Europe/Paris', 'America/New_York')
```

Used by the `LOGIN_STREAK` trigger to determine when a new day starts. On first startup, the plugin auto-detects the JVM default timezone and writes it to config. If you need a different timezone, update this value manually.

Common timezones: `Europe/Paris`, `America/New_York`, `Asia/Tokyo`, `UTC`

Full list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

* * *

#### 

**Webhook Configuration (webhook.yml)**

Controls the Discord embed appearance when advancements are completed. Each advancement can enable webhooks individually via `webhook-enabled: true`.

### Allowed Placeholders

| Placeholder | Description |
|-------------|-------------|
| `%player%` | Player name |
| `%advancement%` | Advancement title |
| `%description%` | Advancement description |
| `%rewards%` | Formatted rewards list |

!!!secondary **PlaceholderAPI support (v2.5+):** Any PlaceholderAPI placeholder (e.g., `%luckperms_prefix%`, `%player_nickname%`) is resolved in all webhook embed fields and vanilla broadcast messages.
!!!

### Embed Structure

```yaml
embed:
  title: "&6&l%player% completed **%advancement%**!"
  description: "> %description%"
  color: "#FFAA00"                # Hex color
  timestamp: true                 # Append UTC timestamp

  author:
    enabled: true
    name: "%player%"
    icon_url: ""                  # Empty = auto via mc-heads.net
    url: ""

  thumbnail:
    enabled: true
    url: ""                       # Empty = auto player avatar

  image:
    enabled: false
    url: ""

  footer:
    enabled: true
    text: "PremiumAdvancements"
    icon_url: ""

  fields:
    rewards:
      enabled: true
      name: "Rewards"
      value: "auto"               # "auto" builds reward list automatically
      inline: false
      empty_text: "*No rewards*"
```

* * *

####

**Vanilla Messages (vanilla-messages.yml)**

Store custom in-game broadcast messages for vanilla Minecraft advancements. When a player completes a vanilla advancement (e.g., "Diamonds!"), and a matching entry exists with `enabled: true`, the message is broadcast to the entire server. Custom messages can be configured either via the in-game GUI or by editing this file directly.

**In-Game GUI:** Open `/padv gui`, select a vanilla tab (e.g. "Minecraft"), and left-click any advancement. Type your custom broadcast message in chat. Supports all color formats: `&#RRGGBB` hex, `<gradient>`, `<rainbow>`, `<color:#XXXXXX>`, `&` codes, and PlaceholderAPI placeholders. Right-click a vanilla advancement to reset its message to default.

### Allowed Placeholders

| Placeholder | Description |
|-------------|-------------|
| `%player%` | Player name |
| `%advancement%` | Advancement title (with hover tooltip showing the description) |
| `%description%` | Advancement description |

### Format

```yaml
"minecraft:story/mine_diamond":
  enabled: true
  message: "&b%player% found Diamonds!"

"minecraft:nether/obtain_blaze_rod":
  enabled: true
  message: "&6%player% obtained a Blaze Rod!"
```

!!!secondary **Note:** This file is auto-generated on first startup. Broadcasts work independently of the Discord webhook system — no webhook URL is needed.
!!!
