> 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/solarcore/cau-hinh-chung.md).

# Cấu hình chung

File: `config.yml`

```yaml
config-version: 1.0
enable-debug: false

placeholders:
  ON: "&a&lON"
  OFF: "&c&lOFF"

messages:
  action-bar-messages: true
  chat-messages: true
  use-action-bar-only: false

override-essentials: true   # Ghi đè lệnh /tpa, /tpahere của Essentials

database:
  type: "SQLITE"            # YAML | SQLITE | MYSQL
  sqlite:
    file: "solar_core.db"
  mysql:
    host: "localhost"
    port: 3306
    database: ""
    user: ""
    password: ""
    max-pool: 15
    use-ssl: false
```

***

## TPA

File: `modules/tpa.yml`

### Lệnh

| Lệnh                 | Mô tả                               |
| -------------------- | ----------------------------------- |
| `/tpa <player>`      | Gửi yêu cầu teleport đến người chơi |
| `/tpahere <player>`  | Yêu cầu người chơi teleport đến bạn |
| `/tpaccept [player]` | Chấp nhận yêu cầu                   |
| `/tpdeny [player]`   | Từ chối yêu cầu                     |
| `/tpacancel`         | Hủy yêu cầu đang gửi                |
| `/tpatoggle`         | Bật/tắt nhận yêu cầu TPA            |
| `/tpaheretoggle`     | Bật/tắt nhận yêu cầu TPAHere        |
| `/tpauto`            | Bật/tắt tự động chấp nhận TPA       |

**Alias:** `etpa`, `tpask`, `tphere`, `tpah`, `tpyes`, `yes`, `tpno`, `no`, ...

### Cấu hình

yaml

```yaml
teleport:
  countdown: 5              # Giây đếm ngược trước khi teleport
  allowed-walk-range: 0     # Khoảng cách tối đa được đi khi đếm ngược (0 = không cho đi)
  safe-teleport: false      # Kiểm tra vị trí an toàn

request:
  expiration-time: 120      # Giây trước khi yêu cầu hết hạn
  cooldown: 30              # Giây chờ giữa hai lần gửi yêu cầu
  daily-limit: -1           # Giới hạn teleport mỗi ngày (-1 = không giới hạn)

gui:
  enabled: true
  command-enabled: false    # Bật lệnh /gui để toggle GUI

boss-bar:
  enabled: true
  color: "YELLOW"           # BLUE | GREEN | PINK | PURPLE | RED | WHITE | YELLOW
  overlay: "PROGRESS"
  text: "&e&lAuto Accept &8&l| &aEnabled"

blacklisted-worlds:
  enabled: true
  worlds:
    - "world_nether"
    - "world_the_end"

worlds:
  world: "Overworld"
  world_nether: "Nether"
  world_the_end: "End"
```

### Quyền hạn

| Quyền                       | Mô tả                | Mặc định |
| --------------------------- | -------------------- | -------- |
| `solarcore.use`             | Dùng các lệnh TPA    | `true`   |
| `solarcore.cooldown.bypass` | Bỏ qua cooldown      | `op`     |
| `solarcore.limit.bypass`    | Bỏ qua giới hạn ngày | `op`     |

***

## Spawn

File: `modules/spawn.yml`

### Lệnh

| Lệnh             | Mô tả             |
| ---------------- | ----------------- |
| `/spawn [số]`    | Teleport về spawn |
| `/setspawn [số]` | Đặt điểm spawn    |
| `/delspawn [số]` | Xóa điểm spawn    |

Plugin hỗ trợ nhiều điểm spawn đánh số. Nếu không truyền số thì dùng spawn số 1.

### Cấu hình

yaml

```yaml
spawn:
  enabled: true
  on-first-join: true       # Teleport về spawn lần đầu vào server
  on-join: true             # Teleport về spawn mỗi lần vào server
  on-death: true            # Teleport về spawn khi hồi sinh
  teleport-countdown: 5     # Giây đếm ngược

  gui:
    enabled: true           # Bật GUI chọn spawn (khi có nhiều spawn)
```

### Quyền hạn

| Quyền                      | Mô tả                  | Mặc định |
| -------------------------- | ---------------------- | -------- |
| `solarcore.command.spawn`  | Dùng `/spawn`          | `true`   |
| `solarcore.admin.setspawn` | Dùng `/setspawn`       | `op`     |
| `solarcore.admin.delspawn` | Dùng `/delspawn`       | `op`     |
| `solarcore.spawn.bypass`   | Bỏ qua đếm ngược spawn | `op`     |

***

## Warps

File: `modules/warps.yml`

### Lệnh

| Lệnh             | Mô tả                            |
| ---------------- | -------------------------------- |
| `/warp <tên>`    | Teleport đến warp                |
| `/warps`         | Xem danh sách warp               |
| `/setwarp <tên>` | Tạo warp mới tại vị trí hiện tại |
| `/delwarp <tên>` | Xóa warp                         |

### Cấu hình

yaml

```yaml
warp:
  teleport-countdown: 5     # Giây đếm ngược khi dùng /warp
```

### Quyền hạn

| Quyền                 | Mô tả                       | Mặc định |
| --------------------- | --------------------------- | -------- |
| `solarcore.warp.use`  | Dùng `/warp`                | `op`     |
| `solarcore.warp.list` | Dùng `/warps`               | `true`   |
| `solarcore.admin`     | Dùng `/setwarp`, `/delwarp` | `op`     |

***

## Home

File: `modules/home.yml`

### Lệnh

| Lệnh             | Mô tả                               |
| ---------------- | ----------------------------------- |
| `/home [tên]`    | Teleport về home (mặc định: `home`) |
| `/homes`         | Xem danh sách home                  |
| `/sethome [tên]` | Đặt home tại vị trí hiện tại        |
| `/delhome [tên]` | Xóa home                            |

### Cấu hình

yaml

```yaml
home:
  teleport-countdown: 3     # Giây đếm ngược
  teleport-cooldown: 3      # Giây chờ giữa hai lần dùng /home
  default-limit: 3          # Số home mặc định

  limit-tiers:              # Phân cấp giới hạn home theo permission
    vip:
      permission: "solarcore.home.vip"
      limit: 5
    mvp:
      permission: "solarcore.home.mvp"
      limit: 12
    admin:
      permission: "solarcore.home.admin"
      limit: 50

  blacklisted-worlds:
    enabled: true
    worlds:
      - "world_nether"
      - "world_the_end"
```

Plugin lấy **limit cao nhất** mà người chơi có permission. Permission `solarcore.home.unlimited` bỏ qua toàn bộ giới hạn.

### Quyền hạn

| Quyền                             | Mô tả                  | Mặc định |
| --------------------------------- | ---------------------- | -------- |
| `solarcore.home.use`              | Dùng `/home`           | `true`   |
| `solarcore.home.set`              | Dùng `/sethome`        | `true`   |
| `solarcore.home.delete`           | Dùng `/delhome`        | `true`   |
| `solarcore.home.list`             | Dùng `/homes`          | `true`   |
| `solarcore.home.unlimited`        | Không giới hạn số home | `op`     |
| `solarcore.home.bypass-cooldown`  | Bỏ qua cooldown        | `op`     |
| `solarcore.home.bypass-countdown` | Bỏ qua đếm ngược       | `op`     |
| `solarcore.home.vip`              | Giới hạn 5 home        | —        |
| `solarcore.home.mvp`              | Giới hạn 12 home       | —        |
| `solarcore.home.admin`            | Giới hạn 50 home       | —        |

***

## RTP

File: `modules/rtp.yml`

### Lệnh

| Lệnh           | Mô tả                                                           |
| -------------- | --------------------------------------------------------------- |
| `/rtp [world]` | Teleport ngẫu nhiên trong thế giới hiện tại hoặc world chỉ định |

### Cấu hình

```yaml
settings:
  players-in-rtp: 3         # Số người tối đa RTP cùng lúc
  max-attempts: 32          # Số lần thử tìm vị trí hợp lệ
  teleport-countdown: 5
  unavailable-blocks:
    - "LAVA"
    - "WATER"
  unavailable-biomes:
    - "BEACH"

world-settings:
  world:
    max-radius: 5000
    min-radius: 500
    center-x: 0
    center-z: 0
    cooldown: 30            # Giây chờ giữa hai lần /rtp
  world_nether:
    max-radius: 500
    min-radius: 50
    center-x: 0
    center-z: 0
    cooldown: 30
```

### Quyền hạn

| Quyền                           | Mô tả               | Mặc định |
| ------------------------------- | ------------------- | -------- |
| `solarcore.rtp.use`             | Dùng `/rtp`         | `true`   |
| `solarcore.rtp.bypass-cooldown` | Bỏ qua cooldown RTP | `op`     |

***

## Balance

File: `modules/balance.yml`

Module quản lý kinh tế — `/pay`, `/bal`, `/baltop`. Yêu cầu **Vault** + Economy plugin (EssentialsX, CMI, ...).

### Lệnh

| Lệnh                      | Mô tả                         |
| ------------------------- | ----------------------------- |
| `/pay <player> <số tiền>` | Chuyển tiền cho người chơi    |
| `/bal`                    | Xem số dư của bản thân        |
| `/bal <player>`           | Xem số dư của người chơi khác |
| `/baltop [trang]`         | Bảng xếp hạng người giàu nhất |

**Alias:** `/balance`, `/money`, `/balancetop`, `/moneytop`, `/richlist`

> `/baltop` chạy bất đồng bộ (async) — không gây lag khi server có nhiều người chơi.

### Cấu hình

yaml

```yaml
pay:
  enabled: true
  tax-rate: 0.0             # Thuế giao dịch (0.0 = miễn phí, 0.05 = 5%, 0.10 = 10%)
  min-amount: 1.0           # Số tiền tối thiểu mỗi lần /pay
  max-amount: 0.0           # Số tiền tối đa (0 = không giới hạn)
  log: true                 # Ghi log giao dịch ra console

balance:
  enabled: true

baltop:
  enabled: true
  per-page: 10              # Số người chơi mỗi trang
```

### Quyền hạn

| Quyền                      | Mô tả                               | Mặc định |
| -------------------------- | ----------------------------------- | -------- |
| `solarcore.pay.use`        | Dùng `/pay`                         | `true`   |
| `solarcore.pay.bypass-tax` | Miễn thuế khi `/pay`                | `op`     |
| `solarcore.balance.self`   | Dùng `/bal` xem số dư bản thân      | `true`   |
| `solarcore.balance.others` | Dùng `/bal <player>` xem người khác | `op`     |
| `solarcore.baltop.use`     | Dùng `/baltop`                      | `true`   |
