> For the complete documentation index, see [llms.txt](https://onic-studio.gitbook.io/solarplugins-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://onic-studio.gitbook.io/solarplugins-docs/plugins/solarelo/cau-hinh.md).

# Cấu hình

### 4. Chi tiết các File Cấu hình (Configurations)

#### File cấu hình chính: `config.yml`

Quản lý chế độ tính điểm Elo, cấu hình chống farm, thưởng Top 1, hiển thị ActionBar/Title, và các hiệu ứng âm thanh/hạt.

```yaml
# Database settings
database:
  type: SQLITE   # SQLITE hoặc MYSQL
  mysql:
    host: localhost
    port: 3306
    database: solarelo
    username: root
    password: password
    pool-size: 10

# Starting elo for new players
default-elo: 1000

# Chế độ tính điểm Elo: FORMULA (công thức Elo chuẩn), RANDOM (ngẫu nhiên), KD (dựa trên tỷ lệ K/D), CUSTOM (công thức tùy chỉnh)
scoring-mode: FORMULA

elo:
  # FORMULA mode: K-factor càng cao = thay đổi elo càng lớn
  k-factor: 32

  # RANDOM mode
  random:
    min-gain: 5
    max-gain: 25
    min-loss: 5
    max-loss: 25

  # KD mode: base * (victim_kd / killer_kd)
  kd:
    base: 20
    min-gain: 3
    max-gain: 50
    min-loss: 3
    max-loss: 50

  # CUSTOM mode: Công thức toán tự định nghĩa (Hỗ trợ +, -, *, /, ^, ( ))
  # Các biến: {killer_elo}, {victim_elo}, {killer_kd}, {victim_kd}, {killer_streak}, {victim_streak}, {k_factor}
  custom:
    formula-gain: "32 * (1 - 1 / (1 + 10^((victim_elo - killer_elo) / 400)))"
    formula-loss: "32 * (1 - (1 - 1 / (1 + 10^((victim_elo - killer_elo) / 400))))"

  # Elo tối thiểu (có thể âm nếu set < 0)
  minimum-elo: -500

# Kill Streak
kill-streak:
  enabled: true
  reset-on-death: true
  bonus-per-kill-percent: 10
  max-bonus-streak: 10
  death-streak-penalty: 5
  announce-streaks:
    - 3
    - 5
    - 10
    - 15
    - 20

# Thưởng đặc biệt khi hạ gục người chơi đứng TOP 1 Server
top-1-bonus:
  enabled: true
  extra-percent: 20
  extra-flat: 10

# Hiển thị Elo thay đổi trên màn hình
display:
  actionbar:
    enabled: true
    duration-ticks: 60
    kill-format: "&a+{gained} Elo &7| &fElo: &e{elo} &7| &fStreak: &c{streak}"
    death-format: "&c-{lost} Elo &7| &fElo: &e{elo}"
  title:
    enabled: true
    streak-title: "&c&l{streak} KILL STREAK!"
    streak-subtitle: "&e+{bonus}% Elo Bonus"
    rank-up-title: "&6&lRANK UP!"
    rank-up-subtitle: "&eBạn đã lên rank {rank}"
    rank-down-title: "&c&lRANK DOWN!"
    rank-down-subtitle: "&7Bạn đã xuống rank {rank}"
    fade-in: 5
    stay: 40
    fadeOut: 10

# Anti-farm settings (Chống farm)
anti-farm:
  enabled: true
  same-player-cooldown: 300
  repeat-kill-threshold: 3
  diminished-return-percent: 50

  # Ngăn nhận Elo khi chênh lệch Elo quá cao (Killer Elo - Victim Elo > 200)
  elo-difference:
    enabled: true
    max-difference: 200
 
  # IP / Subnet Check (Chống clone/alt accounts)
  ip-check:
    enabled: true
    prevent-same-ip: true
    prevent-same-subnet: true

  # Trạng thái hoạt động (AFK / Hoạt động / Spawn Camping Check)
  activity-check:
    enabled: true
    no-move-seconds: 15
    no-attack-seconds: 15
    spawn-camping:
      enabled: true
      protection-seconds: 10
      protection-radius: 15
      action: BLOCK # BLOCK (chặn Elo) hoặc DIMINISH (giảm 50% Elo)

# Elo decay settings (Hao hụt Elo cho người chơi không hoạt động)
# Chỉ áp dụng cho TOP 10 người chơi có Elo cao nhất
elo-decay:
  enabled: true
  
  # Khoảng thời gian chạy kiểm tra hao hụt Elo (Ví dụ: 30m, 1h, 12h, 24h, 1d, 7d)
  # Đơn vị hỗ trợ: m (phút), h (giờ), d (ngày)
  check-interval: "12h"
  
  # Thời gian không thay đổi Elo tối đa trước khi bị trừ Elo (Ví dụ: 12h, 24h, 1d, 3d)
  # inactive-threshold: "24h"
  
  # Số điểm Elo bị trừ mỗi lần
  decay-amount: 20

# Leaderboard settings
leaderboard:
  per-page: 10
  cache-refresh: 60


# Custom sounds & particle effects
effects:
  kill:
    sound: "ENTITY_EXPERIENCE_ORB_PICKUP"
    volume: 1.0
    pitch: 1.0
    particle: "VILLAGER_HAPPY"
    particle-count: 10
  death:
    sound: "ENTITY_PLAYER_HURT"
    volume: 1.0
    pitch: 0.8
    particle: "SMOKE"
    particle-count: 10
  plus:
    sound: "ENTITY_EXPERIENCE_ORB_PICKUP"
    volume: 1.0
    pitch: 1.0
    particle: "VILLAGER_HAPPY"
    particle-count: 10
  minus:
    sound: "ENTITY_PLAYER_HURT"
    volume: 1.0
    pitch: 0.8
    particle: "SMOKE"
    particle-count: 10
  rank-up:
    sound: "UI_TOAST_CHALLENGE_COMPLETE"
    volume: 1.0
    pitch: 1.0
    particle: "TOTEM_OF_UNDYING"
    particle-count: 30
  rank-down:
    sound: "ENTITY_WITHER_DEATH"
    volume: 0.5
    pitch: 0.8
    particle: "LARGE_SMOKE"
    particle-count: 15
  bonus:
    sound: "ENTITY_PLAYER_LEVELUP"
    volume: 1.0
    pitch: 1.2
    particle: "ENCHANTMENT_TABLE"
    particle-count: 20


# Elo Bounty System (Hệ thống Săn thưởng Elo)
bounty:
  enabled: true
  # Thưởng chuỗi hạ gục (Streak Bounties)
  streak-bounties:
    "5":
      reward-elo: 20
      commands:
        - "eco give {killer} 500"
    "10":
      reward-elo: 50
      commands:
        - "eco give {killer} 1000"
        - "give {killer} diamond 1"
  # Thưởng hạ gục TOP bảng xếp hạng (Rank Bounties)
  top-player-bounties:
    "1":
      reward-elo: 50
      commands:
        - "eco give {killer} 2000"
    "2":
      reward-elo: 30
      commands:
        - "eco give {killer} 1000"
    "3":
      reward-elo: 20
      commands:
        - "eco give {killer} 500"

config-version: "1.4.0"

```

***

#### File cấu hình tích hợp Discord: `discord.yml`

Quản lý các thiết lập gửi thông báo trực tiếp lên kênh Discord thông qua Discord Webhooks. Hỗ trợ tùy chỉnh cấu trúc nội dung tin nhắn thường hoặc Embed chi tiết (thêm hình ảnh avatar, màu sắc tùy biến, tiêu đề, mô tả...).

```yaml
discord-webhook:
  enabled: false
  url: "https://discord.com/api/webhooks/..."
  events:
    kill:
      enabled: true
      use-embed: true
      format: "⚔️ **{killer}** ({killer_elo} Elo) has defeated **{victim}** ({victim_elo} Elo)!"
      embed:
        title: "⚔️ Player Defeated"
        description: "**{killer}** ({killer_elo} Elo) has defeated **{victim}** ({victim_elo} Elo)!"
        color: "#ff3c3c"
        footer: "SolarElo Webhook System"
        timestamp: true
        thumbnail: "https://minotar.net/avatar/{killer}/100.png"
    top-1-defeat:
      enabled: true
      use-embed: true
      format: "👑 **{killer}** has defeated the #1 ranked player **{victim}**!"
      embed:
        title: "👑 TOP 1 Defeated"
        description: "**{killer}** has defeated the #1 ranked player **{victim}**!"
        color: "#ffaa00"
        footer: "SolarElo Webhook System"
        timestamp: true
        thumbnail: "https://minotar.net/avatar/{killer}/100.png"
    rank-up:
      enabled: true
      use-embed: true
      format: "⚡ **{player}** has ranked up to **{rank}**!"
      embed:
        title: "⚡ Rank Up"
        description: "**{player}** has ranked up to **{rank}**!"
        color: "#00ffcc"
        footer: "SolarElo Webhook System"
        timestamp: true
        thumbnail: "https://minotar.net/avatar/{player}/100.png"
```

***

#### File cấu hình Mùa giải: `season.yml`

Quản lý thiết lập mùa giải cho server. Hỗ trợ tự động chạy tác vụ khi đến ngày kết thúc cấu hình: thực hiện nén điểm Elo cũ (Soft-Reset) và thực thi chuỗi lệnh Console tự động để phát thưởng theo rank/thứ hạng tương ứng.

```yaml
season:
  # Thời gian kết thúc mùa giải (Định dạng: YYYY-MM-DD HH:mm:ss)
  end-date: "2026-07-01 00:00:00"

  # Soft-Reset settings
  soft-reset:
    enabled: true
    # Công thức: default-elo + (elo-hiện-tại - default-elo) * multiplier
    multiplier: 0.4
    # Reset stats khác (kills, deaths, streaks) về 0
    reset-stats: true
  
  # Auto rewards commands when ending season
  rewards:
    # Trao thưởng theo thứ hạng chính xác (TOP 1, TOP 2, TOP 3, v.v.)
    ranks:
      "1":
        - "broadcast #ffaa00★ MÙA GIẢI KẾT THÚC! #e0e0e0Người chơi #00ff3c{player} đạt TOP 1!"
      "2":
        - "broadcast #ffaa00★ MÙA GIẢI KẾT THÚC! #e0e0e0Người chơi #00ff3c{player} đạt TOP 2!"
    # Hoặc trao thưởng theo khoảng thứ hạng (ví dụ: TOP 4 đến 10)
    brackets:
      "4-10":
        - "give {player} gold_ingot 5"
```

***

#### File cấu hình ngôn ngữ: `messages.yml`

Quản lý định dạng tin nhắn hiển thị trong game. Có thể tùy chỉnh màu sắc qua mã màu cũ (`&`) hoặc mã màu MiniMessage `<gradient>`.

```yaml
prefix: "<gradient:#ff8a00:#da1b60>SolarElo</gradient> #555555> #aaaaaa"

# ── PvP ───────────────────────────────
kill-gain: "#00ff3cKill #ffaa00{victim} #00ff3c+#ffaa00{gained} Elo #aaaaaa(Streak: #ff3c3c{streak}#aaaaaa) #555555| #ffffffTotal: #ffaa00{elo}"
death-loss: "#ff3c3cChết bởi #ffaa00{killer} #ff3c3c-#ffaa00{lost} Elo #555555| #ffffffTotal: #ffaa00{elo}"
streak-end: "#ff3c3cStreak #ffaa00{streak} #ff3c3ckill đã kết thúc!"
top-1-defeat: "#ffaa00[TOP 1 BONUS] Bạn đã nhận thêm #ffaa00{extra} Elo #ffaa00từ việc hạ gục người đứng đầu Server!"
# Định dạng chú thích khi di chuột vào tên người chơi trong chat (\n là xuống dòng)
hover-stats-format: "#ffaa00{player} #ffffffStats:\n#aaaaaaCấp bậc: &r{rank}\n#aaaaaaĐiểm Elo: #ffaa00{elo}\n#aaaaaaTỷ lệ K/D: #ffaa00{kd} #aaaaaa({kills}/{deaths})\n#aaaaaaChuỗi thắng: #ff3c3c{streak}"

# ── Anti-farm ─────────────────────────
anti-farm-cooldown: "#ff3c3cPhải chờ #ffaa00{seconds}s #ff3c3ctrước khi nhận Elo từ việc giết #ffaa00{player} #ff3c3clại."
anti-farm-diminished: "#ffaa00Elo giảm do farm #aaaaaa(giết lặp). Nhận được: #ffaa00{gained}"
anti-farm-ip: "#ff3c3cKhông thể nhận Elo do trùng IP hoặc cùng dải IP subnet."
anti-farm-afk: "#ff3c3cKhông thể nhận Elo do nạn nhân đang AFK hoặc không hoạt động."
anti-farm-spawn: "#ff3c3cKhông thể nhận Elo do nạn nhân vừa hồi sinh hoặc ở gần điểm spawn."
anti-farm-elo-difference: "#ff3c3cKhông thể nhận Elo do chênh lệch Elo giữa hai bên quá lớn ({difference} Elo)."

# ── Rank ──────────────────────────────
rank-up: "#ffaa00★ RANK UP ★ #ffaa00Bạn đã lên &r{rank}#ffaa00!"
rank-down: "#ff3c3c▼ RANK DOWN ▼ #ffaa00Bạn xuống &r{rank}#ffaa00."

# ── Commands ──────────────────────────
elo-info: "#ffaa00{player} #555555| #ffffffElo: #ffaa00{elo} #ffffff| Rank: {rank} #ffffff| K: #00ff3c{kills} #ffffff| D: #ff3c3c{deaths} #ffffff| K/D: #ffaa00{kd} #ffffff| Streak: #ff3c3c{streak}"
elo-info-own: "#ffaa00Stats của bạn #555555| #ffffffElo: #ffaa00{elo} #ffffff| Rank: {rank} #ffffff| K: #00ff3c{kills} #ffffff| D: #ff3c3c{deaths} #ffffff| K/D: #ffaa00{kd} #ffffff| Streak: #ff3c3c{streak}"

# ── Leaderboard ───────────────────────
top-header: "#555555&m         &r #ffaa00SolarElo #555555- #aaaaaaTop Players &r#555555&m         "
top-entry: "#555555{pos}. &r{rank} #ffffff{player} #555555- #ffaa00Elo: #ffffff{elo} #555555| Streak: #ff3c3c{streak}"
top-footer: "#555555&m         &r #aaaaaaTrang #ffaa00{page}#aaaaaa/#ffaa00{max_pages} &r#555555&m         "

# ── Leaderboard Details ───────────────
gui-detail-header: "#555555&m         &r #ffaa00Thống kê chi tiết &r#555555&m         "
gui-detail-format: "#aaaaaaNgười chơi: #ffaa00{player}\n#aaaaaaCấp bậc: &r{rank}\n#aaaaaaĐiểm Elo: #ffaa00{elo}\n#aaaaaaMạng giết: #00ff3c{kills}\n#aaaaaaSố lần chết: #ff3c3c{deaths}\n#aaaaaaTỷ lệ K/D: #ffaa00{kd}\n#aaaaaaChuỗi thắng: #ff3c3c{streak}\n#aaaaaaChuỗi thắng lớn nhất: #ffaa00{best_streak}"
gui-detail-footer: "#555555&m                                           "

# ── Admin ─────────────────────────────
admin-set: "&#00ff3cᴇʟᴏ ᴀᴅᴍɪɴ &8» &fĐã đặt ELO của &#ffffff{player} &fthành &#00ff3c{elo} ELO&f."
admin-add: "&#00ff3cᴇʟᴏ ᴀᴅᴍɪɴ &8» &fĐã cộng &#00ff3c+{amount} ELO &fcho &#ffffff{player}"
admin-remove: "&#00ff3cᴇʟᴏ ᴀᴅᴍɪɴ &8» &fĐã trừ &#ff3c3c-{amount} ELO &fcủa &#ffffff{player}"
admin-reset: "&#00ff3cᴇʟᴏ ᴀᴅᴍɪɴ &8» &fĐã reset ELO & Stats của &#ffffff{player} &fvề mặc định."

# ── Misc ──────────────────────────────
reload: "&#00ff3cᴇʟᴏ ᴀᴅᴍɪɴ &8» &fReload cấu hình plugin thành công!"
no-permission: "&#ff3c3cᴇʟᴏ ᴀᴅᴍɪɴ &8» &cBạn không có quyền thực hiện thao tác này."
player-not-found: "&#ff3c3cᴇʟᴏ ᴀᴅᴍɪɴ &8» &cKhông tìm thấy người chơi này."
season-resetting: "&#ffaa00ᴇʟᴏ ᴀᴅᴍɪɴ &8» &fĐang tiến hành kết thúc mùa giải và trao thưởng..."
season-reset-success: "&#00ff3cᴇʟᴏ ᴀᴅᴍɪɴ &8» &fMùa giải đã được reset thành công! Đã trao thưởng cho các người chơi hàng đầu và thực hiện soft-reset ELO."
elo-decay-notice: "#ff3c3cBạn bị trừ {amount} Elo do không hoạt động tích cực gần đây!"

# ── Bounty ────────────────────────────
bounty-broadcast-streak: "#ffaa00[SĂN THƯỞNG] #ffaa00{player} #ffffffđã đạt chuỗi #ff3c3c{streak} kills#ffffff! Treo thưởng: #00ff3c+{elo} Elo #ffffff+ phần quà!"
bounty-claim-streak: "#ffaa00[SĂN THƯỞNG] #ffaa00{killer} #ffffffđã chấm dứt chuỗi #ff3c3c{streak} #ffffffcủa #ffaa00{victim} #ffffffvà nhận thưởng (#00ff3c+{elo} Elo#ffffff)!"
bounty-claim-top: "#ffaa00[SĂN THƯỞNG] #ffaa00{killer} #ffffffđã tiêu diệt người chơi TOP #ffaa00{rank} #ffaa00({victim}) #ffffffvà nhận thưởng (#00ff3c+{elo} Elo#ffffff)!"
welcome-top-10: "#ffaa00[Chào Mừng] Huyền thoại #ffffff{player} #aaaaaa(Hạng #{rank} | {elo} Elo) #ffaa00đã tham gia máy chủ!"
welcome-top-3: "#ffaa00[Chào Mừng] Huyền thoại #ffffff{player} #aaaaaa(Hạng #{rank} | {elo} Elo) #ffaa00đã tham gia máy chủ!"
bounty-targeted: "#ffaa00[Nhiệm Vụ] Một thợ săn đã nhận khế ước truy nã bạn!"

# ── Elo Lock ──────────────────────────
elo-locked-by-admin: "&#ff3c3cElo của bạn đã bị khóa bởi Admin!"
elo-unlocked-by-admin: "&#00ff3cElo của bạn đã được mở khóa bởi Admin!"
admin-lock-success: "&#00ff3cᴇʟᴏ ᴀᴅᴍɪɴ &8» &fĐã khóa Elo của player &#ffffff{player} &fthành công."
admin-unlock-success: "&#00ff3cᴇʟᴏ ᴀᴅᴍɪɴ &8» &fĐã mở khóa Elo của player &#ffffff{player} &fthành công."
elo-locked-auto: "&#ff3c3cElo của bạn đã bị tự động khóa do đạt mức tối thiểu!"
bounty-locked-error: "&#ff3c3cElo của bạn đang bị khóa, không thể sử dụng tính năng săn thưởng!"

config-version: "1.4.0"
```

***

#### File cấu hình cấp bậc: `rank.yml`

Quản lý cấu hình thứ hạng của người chơi dựa trên điểm Elo hiện có. Cấp bậc được sắp xếp tự động từ thấp đến cao dựa theo mốc điểm `min-elo`.

```yaml
ranks:
  lt5:
    display: "&7LT5"
    min-elo: 0
    prefix: "&7[LT5]"
    rankup-commands: []

  ht5:
    display: "&7HT5"
    min-elo: 1000
    prefix: "&7[HT5]"
    rankup-commands: []

  lt4:
    display: "&aLT4"
    min-elo: 1150
    prefix: "&a[LT4]"
    rankup-commands:
      - "broadcast &e{player} &ađã đột phá lên Rank &aLT4!"

  ht4:
    display: "&aHT4"
    min-elo: 1300
    prefix: "&a[HT4]"
    rankup-commands: []

  # Có thể thêm vô số hạng khác theo logic tăng dần điểm min-elo...
```

***

#### File cấu hình nhiệm vụ: `gui/bounty.yml`

Quản lý giao diện nhận nhiệm vụ săn thưởng tiêu diệt người chơi khác.

```yaml
title: "#ff3c3cBounty Quests (Săn Tiền Thưởng)"
rows: 6

filler:
  enabled: true
  material: "GRAY_STAINED_GLASS_PANE"

reward-elo: 20
cooldown-seconds: 5400
cancel-cooldown-seconds: 300
commands:
  - "give {killer} diamond 2"
  - "broadcast #555555[#ffaa00SolarElo#555555] #00ff3c{killer} #ffffffđã hoàn thành nhiệm vụ và tiêu diệt #ff3c3c{victim}#ffffff!"

target-player-head:
  name: "#ff3c3c[Mục Tiêu] #ffffff{player}"
  lore:
    - "#aaaaaaElo: #ffaa00{elo}"
    - "#aaaaaaRank: &r{rank}"
    - ""
    - "#ffaa00Nhấp để nhận nhiệm vụ tiêu diệt mục tiêu này!"
    - "#ffaa00Thành công: #00ff3c+{reward_elo} Elo #ffffff+ phần thưởng."

active-bounty-item:
  name: "#00ff3c[Nhiệm Vụ Hoạt Động]"
  material: "PLAYER_HEAD"
  slot: 13
  lore:
    - "#aaaaaaMục tiêu: #ff3c3c{target}"
    - "#aaaaaaThưởng Elo: #00ff3c+{reward_elo}"
    - ""
    - "#ffffffHãy tìm và tiêu diệt #ffaa00{target} #ffffffđể nhận thưởng!"

cancel-bounty-item:
  name: "#ff3c3c[Hủy Nhiệm Vụ Hiện Tại]"
  material: "BARRIER"
  slot: 22
  lore:
    - "#ffffffNhấp để huỷ bỏ hợp đồng săn thưởng hiện tại."
    - "#ffffffBạn sẽ bị phạt #ff3c3c{cooldown} giây #ffffffchờ trước"
    - "#ffffffkhi có thể nhận nhiệm vụ mới."
  confirm_sound: error

cooldown-item:
  name: "#ff3c3c[Thời Gian Chờ Cooldown]"
  material: "CLOCK"
  slot: 22
  lore:
    - "#ffffffBạn đã hoàn thành hoặc hủy bỏ nhiệm vụ gần đây."
    - "#ffffffVui lòng chờ để nhận nhiệm vụ tiếp theo."
    - ""
    - "#ffffffThời gian còn lại: #ff3c3c{remaining} giây."

no-targets-item:
  name: "#ff3c3c[Không Có Mục Tiêu Hợp Lệ]"
  material: "BARRIER"
  slot: 22
  lore:
    - "#ffffffHiện tại không có người chơi online hợp lệ khác."
    - "#ffffff(Bạn không thể tự săn thưởng chính mình)"

config-version: "1.1.0"
```

***

#### File cấu hình Menu Chính: `gui/main.yml`

Quản lý giao diện chính (Menu Tổng) hiển thị khi gõ lệnh `/elo`.

```yaml
# Elo Main Menu GUI Configuration (Menu Chính SolarElo)
title: "ᴇʟᴏ ᴍᴇɴᴜ"
rows: 3

filler:
  enabled: false
  material: "GRAY_STAINED_GLASS_PANE"

bounty-item:
  enabled: true
  name: "#ff3c3c⚔ ʙᴏᴜɴᴛʏ ⚔"
  material: "DIAMOND_SWORD"
  slot: 10
  lore:
    - "&fClick to view the Bounty list"
    - "&fand accept contracts to eliminate other players."
    - ""
    - "#ff3c3cClick to open!"
  customModelData: -1
  confirm_sound: click

leaderboard-item:
  enabled: true
  name: "#00BFFF★ ʟᴇᴀᴅᴇʀʙᴏᴀʀᴅ ★"
  material: "BLUE_BANNER"
  slot: 12
  lore:
    - "&fClick to view the ELO Leaderboard"
    - "&fand other players' statistics."
    - ""
    - "#00BFFFClick to open!"
  customModelData: -1
  confirm_sound: click

rewards-item:
  enabled: true
  name: "#00ff3c✪ ʀᴇᴡᴀʀᴅs ✪"
  material: "CHEST"
  slot: 14
  lore:
    - "&fClick to view rank breakthrough rewards"
    - "&fearned by reaching ELO milestones."
    - ""
    - "#00ff3cClick to open!"
  customModelData: -1
  confirm_sound: xp

settings-item:
  enabled: true
  name: "#ffaa00⚙ sᴇᴛᴛɪɴɢs ⚙"
  material: "COMPARATOR"
  slot: 16
  lore:
    - "&fClick to customize notifications,"
    - "&fwelcome effects, and titles."
    - ""
    - "#ffaa00Click to open!"
  customModelData: -1
  confirm_sound: click

ip-blocked-item:
  material: "RED_BANNER"
  slot: 13
  name: "#ff3c3c⚠ ᴀᴄᴄᴇꜱꜱ ᴅᴇɴɪᴇᴅ ⚠"
  lore:
    - "#aaaaaaDetected multiple accounts on the same IP!"
    - "#aaaaaaGUI access has been disabled."
    - ""
    - "#ff3c3cPlease disconnect other accounts to unlock."
  customModelData: -1

config-version: "1.2.0"
```

***

#### File cấu hình xác nhận nhận nhiệm vụ: `gui/confirmation.yml`

Quản lý giao diện xác nhận trước khi người chơi chính thức nhận một hợp đồng săn thưởng.

```yaml
title: "#ff3c3c{target}"
rows: 3

filler:
  enabled: true
  material: "GRAY_STAINED_GLASS_PANE"

target-slot: 13

confirm-item:
  name: "#00ff3cᴄᴏɴꜰɪʀᴍ"
  material: "LIME_STAINED_GLASS_PANE"
  slots: [10, 11, 12]
  lore:
    - "#ffffffHãy chắc chắn bạn muốn nhận hợp đồng này."
    - ""
    - "#ffffffMục tiêu: #ff3c3c{target}"
    - "#ffffffNhấp vào đây để xác nhận."

cancel-item:
  name: "#ff3c3cɢᴏ ʙᴀᴄᴋ"
  material: "RED_STAINED_GLASS_PANE"
  slots: [14, 15, 16]
  lore:
    - "#ffffffHủy bỏ và quay lại"
    - "#ffffffdanh sách mục tiêu."

config-version: "1.0.0"
```

#### File cấu hình Menu Cài Đặt: `gui/settings.yml`

Quản lý giao diện cài đặt cá nhân nơi người chơi có thể tự do bật/tắt các thông báo chat, hiệu ứng âm thanh chào mừng và hiển thị Title trên màn hình của họ.

```yaml
# Elo Settings Menu GUI Configuration (Menu Cài Đặt SolarElo)
title: "sᴇᴛᴛɪɴɢs"
rows: 3

filler:
  enabled: false
  material: "GRAY_STAINED_GLASS_PANE"

items:
  chat-notification:
    name: "#00BFFFᴄʜᴀᴛ ɴᴏᴛɪꜰɪᴄᴀᴛɪᴏɴ"
    material: "BOOK"
    slot: 11
    lore_on:
      - "&a✔ Enabled"
      - "&7Click to disable."
    lore_off:
      - "&c❌ Disabled"
      - "&7Click to enable."
    confirm_sound: click

  title-notification:
    name: "#ff3c3cᴛɪᴛʟᴇ ɴᴏᴛɪꜰɪᴄᴀᴛɪᴏɴ"
    material: "COMPASS"
    slot: 15
    lore_on:
      - "&a✔ Enabled"
      - "&7Click to disable."
    lore_off:
      - "&c❌ Disabled"
      - "&7Click to enable."
    confirm_sound: click

back-button:
  name: "#ff3c3cʙᴀᴄᴋ"
  material: "ARROW"
  slot: 22
  lore:
    - "&fClick to return to the main menu"
  confirm_sound: click
```

#### File cấu hình Admin GUI: `gui/admin.yml`

Quản lý các giao diện dành riêng cho Admin để cộng, trừ, đặt điểm ELO, reset chỉ số người chơi, và xem lịch sử ELO/PvP của họ.

```yaml
admin-list:
  title: "ᴇʟᴏ ᴀᴅᴍɪɴ - {page}"

admin-detail:
  title: "ᴀᴅᴍɪɴ ᴅᴇᴛᴀɪʟs - {player}"

elo-history:
  title: "ᴇʟᴏ ʜɪsᴛᴏʀʏ - {player}"

kill-history:
  title: "ᴘᴠᴘ ʜɪsᴛᴏʀʏ - {player}"

# Navigation Buttons (Các nút điều hướng)
back:
  name: "#00BFFFʙᴀᴄᴋ"
  lore:
    - "&fClick to go to the previous page"
  material: "ARROW"
  slot: 45
  customModelData: -1

next:
  name: "#00BFFFɴᴇxᴛ"
  lore:
    - "&fClick to go to the next page"
  material: "ARROW"
  slot: 53
  customModelData: -1

refresh:
  name: "#00ff3cʀᴇꜰʀᴇsʜ"
  lore:
    - "&fClick to refresh the list"
  material: "FEATHER"
  slot: 49
  customModelData: -1

filter:
  name: "#00BFFFғɪʟᴛᴇʀ"
  lore:
    - "&fClick to toggle filter"
  material: "HOPPER"
  slot: 49
  customModelData: -1

# Actions (Các nút thao tác chi tiết)
add-elo:
  name: "#00ff3cᴀᴅᴅ ᴇʟᴏ"
  lore:
    - "&fClick to add ELO to this player"
  material: "EMERALD"
  slot: 28
  customModelData: -1

set-elo:
  name: "#ffaa00sᴇᴛ ᴇʟᴏ"
  lore:
    - "&fClick to set player's ELO"
  material: "NAME_TAG"
  slot: 29
  customModelData: -1

remove-elo:
  name: "#ff3c3cʀᴇᴍᴏᴠᴇ ᴇʟᴏ"
  lore:
    - "&fClick to deduct ELO from player"
  material: "REDSTONE"
  slot: 30
  customModelData: -1

back-to-list:
  name: "#aaaaaaʙᴀᴄᴋ"
  lore:
    - "&fClick to return to player list"
  material: "ARROW"
  slot: 31
  customModelData: -1

elo-history:
  name: "#00BFFFᴇʟᴏ ʜɪsᴛᴏʀʏ"
  lore:
    - "&fClick to view ELO change history"
  material: "BOOK"
  slot: 32
  customModelData: -1

pvp-history:
  name: "#00BFFFᴘᴠᴘ ʜɪsᴛᴏʀʏ"
  lore:
    - "&fClick to view PvP logs"
  material: "DIAMOND_SWORD"
  slot: 33
  customModelData: -1

reset-stats:
  name: "#ff3c3cʀᴇsᴇᴛ sᴛᴀᴛs"
  lore:
    - "&fClick to reset ELO and stats to default"
  material: "GUNPOWDER"
  slot: 34
  customModelData: -1

# ELO Change Reasons (Lý do thay đổi Elo hiển thị)
reasons:
  kill: "⚔ Hạ gục {player}"
  death: "☠ Bị hạ gục bởi {player}"
  admin-set: "⚙ Thay đổi bởi Admin ({elo} Elo)"
  admin-add: "✚ Cộng bởi Admin (+{amount} Elo)"
  admin-remove: "➖ Trừ bởi Admin (-{amount} Elo)"
  admin-reset: "⟳ Reset bởi Admin"
```

***

### 5. Hướng dẫn thiết lập & Cài đặt

1. **Cài đặt plugin**: Sao chép file `SolarElo-obfuscated.jar` vào thư mục `plugins/` của máy chủ.
2. **Khởi chạy máy chủ**: Để plugin tự động giải nén các file cấu hình mặc định vào thư mục `plugins/SolarElo/`.
3. **Tích hợp PlaceholderAPI**:
   * Hãy cài đặt [PlaceholderAPI](https://extendedclip.com/placeholderapi/) để sử dụng được các placeholder của SolarElo trên Scoreboard, Tablist hay các plugin Chat khác.
4. **Cấu hình Discord Webhook**:
   * Tại máy chủ Discord của bạn, vào **Server Settings** -> **Integrations** -> **Webhooks** -> **New Webhook**.
   * Sao chép liên kết Webhook vừa tạo dán vào trường `url` dưới phần `discord-webhook` ở `discord.yml`.
   * Bật `enabled: true` và chọn các event bạn muốn đồng bộ.
5. **Cơ chế chẩn đoán lỗi bằng Console Log**:
   * Nếu trong quá trình thử nghiệm PvP bạn thấy Elo không tăng hoặc giảm, hãy kiểm tra màn hình console. SolarElo sẽ xuất chi tiết lý do chặn Elo bằng Log như:
     * `[Anti-Farm] Bo qua cong/tru Elo cho Killer va Victim. Ly do: BLOCKED_IP` (Do bạn đang chạy thử hai nick chung máy tính/Localhost).
     * `[Anti-Farm] Bo qua cong/tru Elo cho Killer va Victim. Ly do: BLOCKED_SPAWN` (Do nạn nhân vừa hồi sinh hoặc đang ở quá gần điểm spawn).
     * `[Anti-Farm] Bo qua cong/tru Elo cho Killer va Victim. Ly do: BLOCKED_AFK` (Do tài khoản nạn nhân đứng yên không di chuyển/không đánh trả).
   * Bạn có thể vô hiệu hóa tạm thời các cơ chế này trong `config.yml` bằng cách tắt `anti-farm.ip-check.enabled: false` hoặc `anti-farm.activity-check.enabled: false` để phục vụ công tác test.
6. **Tải lại cấu hình**: Gõ `/eloadmin reload` trong game hoặc từ bảng điều khiển console để áp dụng cấu hình mới thay đổi tức thì mà không cần restart server.
