Hệ thống mốc nạp
Hệ thống milestone thưởng người chơi khi đạt mốc nạp tiền nhất định. Hỗ trợ milestone cá nhân và server-wide.
Loại milestone
Milestone cá nhân - Thưởng cho từng người chơi khi đạt mốc
- Mỗi người chơi track riêng
- Thưởng độc lập
- Có thể đạt nhiều lần (theo kỳ)
Milestone server - Thưởng cho toàn server khi tổng nạp đạt mốc
- Track tổng nạp của tất cả người chơi
- Thưởng cho tất cả online players
- Tạo sự kiện cộng đồng
Kỳ milestone
Milestone có 5 loại kỳ:
| Kỳ | Mô tả | Reset |
|---|---|---|
ALL | Tổng nạp từ trước đến nay | Không bao giờ |
DAILY | Tổng nạp trong ngày | 00:00 mỗi ngày |
WEEKLY | Tổng nạp trong tuần | 00:00 Thứ 2 |
MONTHLY | Tổng nạp trong tháng | 00:00 ngày 1 |
YEARLY | Tổng nạp trong năm | 00:00 ngày 1/1 |
Cấu hình Player Milestone
File: plugins/SimpPay/milestones/milestones-player-config.yml
# SimpPay @ 2026# Made by typical.smc
# Player Milestones Configuration
# ALL - Tổng nạp từ trước đến nayall: - name: "Nạp 100k lần đầu" amount: 100000 commands: - "give {player} diamond 5" - "broadcast &a{player} đã nạp 100k lần đầu!" bossbar: enabled: true title: "<gradient:green:aqua>Mốc nạp: 100k</gradient>" color: "GREEN" style: "PROGRESS"
- name: "Nạp 500k tổng" amount: 500000 commands: - "give {player} diamond 20" - "give {player} emerald 5" bossbar: enabled: true title: "<gradient:yellow:gold>Mốc nạp: 500k</gradient>" color: "YELLOW" style: "PROGRESS"
- name: "Nạp 1 triệu tổng" amount: 1000000 commands: - "give {player} diamond 50" - "give {player} emerald 10" - "give {player} netherite_ingot 1" bossbar: enabled: true title: "<gradient:red:gold>Mốc nạp: 1 triệu</gradient>" color: "RED" style: "PROGRESS"
# DAILY - Tổng nạp trong ngàydaily: - name: "Nạp 50k trong ngày" amount: 50000 commands: - "give {player} diamond 3" bossbar: enabled: true title: "Mốc ngày: 50k" color: "BLUE" style: "NOTCHED_10"
- name: "Nạp 200k trong ngày" amount: 200000 commands: - "give {player} diamond 15" - "give {player} emerald 3" bossbar: enabled: true title: "Mốc ngày: 200k" color: "PURPLE" style: "NOTCHED_10"
# WEEKLY - Tổng nạp trong tuầnweekly: - name: "Nạp 200k trong tuần" amount: 200000 commands: - "give {player} diamond 10" bossbar: enabled: true title: "Mốc tuần: 200k" color: "GREEN" style: "NOTCHED_20"
- name: "Nạp 500k trong tuần" amount: 500000 commands: - "give {player} diamond 30" - "give {player} emerald 5" bossbar: enabled: true title: "Mốc tuần: 500k" color: "YELLOW" style: "NOTCHED_20"
# MONTHLY - Tổng nạp trong thángmonthly: - name: "Nạp 500k trong tháng" amount: 500000 commands: - "give {player} diamond 25" bossbar: enabled: true title: "Mốc tháng: 500k" color: "PINK" style: "PROGRESS"
- name: "Nạp 1 triệu trong tháng" amount: 1000000 commands: - "give {player} diamond 60" - "give {player} emerald 10" - "give {player} netherite_ingot 2" bossbar: enabled: true title: "Mốc tháng: 1 triệu" color: "RED" style: "PROGRESS"
# YEARLY - Tổng nạp trong nămyearly: - name: "Nạp 5 triệu trong năm" amount: 5000000 commands: - "give {player} diamond 200" - "give {player} emerald 50" - "give {player} netherite_ingot 10" bossbar: enabled: true title: "Mốc năm: 5 triệu" color: "PURPLE" style: "PROGRESS"Cấu hình Server Milestone
File: plugins/SimpPay/milestones/milestones-server-config.yml
# SimpPay @ 2026# Made by typical.smc
# Server Milestones Configuration
# ALL - Tổng nạp server từ trước đến nayall: - name: "Server đạt 10 triệu" amount: 10000000 commands: - "broadcast &6&l[SERVER MILESTONE] &eServer đã đạt 10 triệu nạp!" - "give @a diamond 10" bossbar: enabled: true title: "<gradient:gold:yellow>Server: 10 triệu</gradient>" color: "YELLOW" style: "PROGRESS"
- name: "Server đạt 50 triệu" amount: 50000000 commands: - "broadcast &6&l[SERVER MILESTONE] &eServer đã đạt 50 triệu nạp!" - "give @a diamond 50" - "give @a emerald 10" bossbar: enabled: true title: "<gradient:gold:red>Server: 50 triệu</gradient>" color: "RED" style: "PROGRESS"
# MONTHLY - Tổng nạp server trong thángmonthly: - name: "Server đạt 5 triệu tháng này" amount: 5000000 commands: - "broadcast &6&l[MONTHLY GOAL] &eServer đạt 5 triệu tháng này!" - "give @a diamond 20" bossbar: enabled: true title: "Server tháng: 5 triệu" color: "PINK" style: "NOTCHED_12"Chi tiết cấu hình
name
- Kiểu:
string - Bắt buộc: Có
- Mô tả: Tên milestone (dùng để track completion)
amount
- Kiểu:
integer(VNĐ) - Bắt buộc: Có
- Mô tả: Số tiền cần đạt để hoàn thành milestone
commands
- Kiểu:
list<string> - Bắt buộc: Có
- Mô tả: Lệnh thực thi khi hoàn thành milestone
Placeholders:
{player}- Tên người chơi{amount}- Số tiền milestone{milestone_name}- Tên milestone
Ví dụ:
commands: - "give {player} diamond 10" - "eco give {player} 1000" - "lp user {player} permission set vip.rank" - "broadcast &a{player} đã đạt mốc {milestone_name}!"bossbar
Cấu hình BossBar hiển thị tiến độ milestone.
bossbar.enabled
- Kiểu:
boolean - Mặc định:
true - Mô tả: Bật/tắt BossBar cho milestone này
bossbar.title
- Kiểu:
string - Mô tả: Tiêu đề BossBar (hỗ trợ MiniMessage)
Ví dụ:
title: "<gradient:green:aqua>Mốc nạp: 100k</gradient>"title: "&6&lMốc tháng: 500k"title: "Tiến độ: {current}/{target}"bossbar.color
- Kiểu:
string - Mặc định:
"GREEN" - Mô tả: Màu BossBar
Giá trị hợp lệ:
YELLOW- VàngGREEN- Xanh láBLUE- Xanh dươngRED- ĐỏPINK- HồngPURPLE- TímWHITE- Trắng
bossbar.style
- Kiểu:
string - Mặc định:
"PROGRESS" - Mô tả: Kiểu BossBar
Giá trị hợp lệ:
PROGRESS- Thanh liềnNOTCHED_6- 6 đoạnNOTCHED_10- 10 đoạnNOTCHED_12- 12 đoạnNOTCHED_20- 20 đoạn
Retroactive Checking
SimpPay kiểm tra tất cả milestone chưa hoàn thành mỗi khi có thanh toán thành công.
Ví dụ:
- Player có tổng nạp 80k
- Nạp thêm 50k → Tổng 130k
- Plugin check:
- Milestone 100k? ✅ Chưa hoàn thành, tổng >= 100k → Award
- Milestone 500k? ❌ Tổng < 500k → Skip
BossBar Display
BossBar hiển thị tiến độ đến milestone tiếp theo:
[████████░░░░░░░░░░░░] 40%Mốc nạp: 100k (40,000/100,000)- Tự động cập nhật sau mỗi thanh toán
- Chỉ hiển thị milestone gần nhất chưa hoàn thành
- Tự động ẩn khi hoàn thành tất cả milestone
Testing
-
Tạo milestone test
daily:- name: "Test 10k"amount: 10000commands:- "give {player} diamond 1"bossbar:enabled: truetitle: "Test: 10k"color: "GREEN"style: "PROGRESS" -
Reload config
/simppayadmin reload -
Fake payment
/simppayadmin fakebank <player> 10000 -
Kiểm tra
- BossBar hiển thị đúng
- Commands được thực thi
- Message hiển thị
- Database có record trong
milestone_completion
Best practices
-
Sắp xếp theo thứ tự tăng dần: Milestone nhỏ trước, lớn sau
-
Tên milestone rõ ràng: Dùng tên mô tả rõ ràng để dễ quản lý
-
Thưởng hợp lý: Thưởng tăng dần theo mốc
-
Dùng BossBar: Giúp người chơi thấy tiến độ
-
Test trước khi deploy: Dùng fake payment để test
Xem thêm
- Streak rewards - Thưởng nạp liên tiếp
- Nạp lần đầu - Thưởng nạp lần đầu
- Placeholders - Hiển thị tiến độ milestone