# Config Overview

Structure of CoreEngine's configuration files. Every file can be edited directly; for most changes, `/coreengine reload` is enough afterward instead of a server restart.

## Main Configuration (config.yml)

Location: `plugins/CoreEngine/config.yml`

This file only contains shared base settings. Feature-specific settings live in the individual files under `plugins/CoreEngine/modules/`.

Most important sections:

```yaml
general:
  # Seconds until confirmations (e.g. shop purchases) expire
  confirmation-timeout: 30

economy:
  # Starting balance for new accounts
  start-balance: 1000.0
  # Currency name and symbol
  currency-name: "Coin"
  currency-name-plural: "Coins"
  currency-symbol: "⛃"
  # Limits and minimum amount
  max-balance: 1000000000.0
  min-transfer: 0.01
  # Entries per /baltop page
  baltop-entries-per-page: 10

cooldown:
  # Fallback cooldown for commands without their own value
  default: 0
  # Cooldowns for core commands (module cooldowns are in modules/*.yml)
  commands:
    pay: 1

cost:
  # Costs for core commands (0 = free)
  commands: {}

warmup:
  # Default wait time for all teleport commands
  default:
    duration: 3
    cancel-on-move: true
    display: actionbar
    particles:
      enabled: true
      type: PORTAL
      count: 10
      radius: 0.5
  # Warmups for core commands
  commands: {}
```

## Module Configurations (modules/*.yml)

Location: `plugins/CoreEngine/modules/<module>.yml`

Every module file can be turned on or off via `enabled: true/false`. Many modules additionally have their own `cooldown`, `cost` and `warmup` settings in the same format as in `config.yml`.

| Module File | Category | Most Important Settings |
|---|---|---|
| `afk.yml` | AFK | Auto-AFK timeout, AFK kick time, broadcast, tab list decoration, anti-AFK machine detection |
| `betterhud.yml` | Integration | BetterHud popup integration for economy and teams |
| `chat.yml` | Chat | Chat format, display name, LuckPerms integration, Nexo glyphs, team/alliance chat |
| `holograms.yml` | Holograms | View distance, line spacing, placeholder update rate, text shadow, background |
| `homes.yml` | Homes | Home limit, name length, world blacklist, cooldown, cost, warmup |
| `jobs.yml` | Jobs | Max jobs, leveling, quests, boosts, dynamic pay, integrations, job shop, exploit protection |
| `joinleave.yml` | Join/Leave | Join/leave texts, MOTD, sounds, titles, action bar, vanish suppression |
| `messaging.yml` | Messages | Formats for private messages, maximum message length |
| `mobteleport.yml` | Mob Teleport | Radius, leash reattachment, invulnerability, entity filter, region protection |
| `moderation.yml` | Moderation | Warn actions, jail rules, CommandSpy blacklist, vanish |
| `nick.yml` | Nicknames | Nick length, colors, formatting |
| `permissions.yml` | Command Visibility | Tab completion only shows permitted commands, hides namespaced duplicates |
| `rtp.yml` | Random Teleport | Radius, height range, attempts, world border, biome, queue, claim protection, cost |
| `shop.yml` | Chest Shops | Shop limit, hopper protection, price limits, tax, sounds, integrations |
| `sleep.yml` | Sleep | Sleep percentage, skip speed, AFK exclusion, world mode |
| `spawn.yml` | Spawn | First spawn, respawn logic, cooldown, cost, warmup |
| `stations.yml` | Stations | Virtual workstation commands, hub menu |
| `tab.yml` | Tab List | Tab name, LuckPerms integration, Nexo glyphs, optional fixed tab layout |
| `team.yml` | Teams | Limits, ranks, team level, score, bank, menu, CoreProtect logging |
| `teleport.yml` | Teleport | Safety check, combat lock, back positions, cooldown, cost, warmup |
| `tpa.yml` | TPA | Request timeout, distance limit, cross-dimension, cooldown, cost, warmup |
| `utility.yml` | Utility | God persistence, near radius, toggleable utility commands, cost/cooldowns |
| `warps.yml` | Warps | Name length, cooldown, cost, warmup |
| `websession.yml` | Web Interface | Configuration of the web interface for `/cweb` |
| `world.yml` | World | Gamerule menu, custom gamerule presets |
| `worldspawn.yml` | World Spawn | Toggle for `/setworldspawn` |

### Common Structure of All Modules

```yaml
enabled: true  # Enables/disables the entire module

# Command-specific cooldowns (seconds, 0 = disabled)
cooldown:
  commands:
    home: 5
    warp: 3

# Command-specific costs (economy, 0 = free)
cost:
  commands:
    home: 0
    rtp: 100.0

# Command-specific warmups (wait time before action/teleport)
warmup:
  commands:
    home:
      duration: 2
      cancel-on-move: true
      display: actionbar
      particles:
        enabled: true
        type: PORTAL
```

> **Note:** Bypass permissions can be used to bypass these restrictions: `cooldown.bypass.<command>`, `cost.bypass.<command>` and `warmup.bypass.<command>` (or `.*` for all commands of a module).

## Messages (messages.yml)

Location: `plugins/CoreEngine/messages.yml`

All texts that players see are stored here centrally in MiniMessage format (colors like `<red>`, `<bold>`, `<blue>` etc.) and can be freely customized.

> **Tip:** After changes to `messages.yml`, `/coreengine reload` is enough; a restart is not necessary.

## Jobs: Custom Definition Files

Jobs are a special case: in addition to `modules/jobs.yml` (general job settings), each job has its own file under `modules/jobs/`, for example `miner.yml` or `farmer.yml`.

```yaml
name: "Miner"
color: "<#FFB400>"           # Hex color
short-name: "MIN"
icon: "DIAMOND_PICKAXE"
description: "Mine ores for profit"
max-level: 100
actions:
  BREAK:
    DIAMOND_ORE:
      money: 10.0
      xp: 5.0
    COAL_ORE:
      money: 2.0
      xp: 1.0
titles:
  "1": "Novice Miner"
  "25": "Expert Miner"
level-up-rewards:
  "10": "give <player> diamond 5"
```

`modules/jobs.yml` controls the general settings:

```yaml
enabled: true
jobs:
  max-jobs: 2              # Max. simultaneously active jobs per player
  leveling:
    max-level: 100
    xp-per-level: 100.0
  quests:
    enabled: true
    daily-reset: "00:00"
  boosts:
    enabled: true
  dynamic-pay:
    enabled: true
    player-count-multiplier: 0.5
  shop:
    enabled: true
```
