貸款Loans
選用功能,預設可關閉。設 loans.enabled: false 會連同排程一起停用,
不會有任何背景任務。
loans:
enabled: true
max_active_per_player: 1 # 同時可持有的貸款數
min_amount: 1
max_amount: 100000
min_installment: 1 # 每期最低還款額
min_installment_by_amount: # 依貸款總額提高最低還款額
'1000': 50
'5000': 250
max_installments: 60 # 最大分期數
default_interval_hours: 24 # 每期間隔
charge_check_seconds: 60 # 檢查該扣款的頻率
max_missed_payments: 3 # 超過即標記違約
違約處置
defaulted_effects:
enabled: true
refresh_seconds: 5
duration_seconds: 8
effects:
- SLOW:1
- SLOW_DIGGING:1
格式是 效果名稱:等級,等級從 1 起算。效果會定期重新套用以維持存在。
操作
/loan 或 /vault loan 開啟選單,可申請、查詢狀態與還款。
扣款檢查在非同步執行緒上進行,但實際的扣款動作會回到主執行緒執行 ——
Bukkit 的 API 不保證執行緒安全。
Optional, and off by default in many setups. Setting loans.enabled: false disables
the scheduler too, so no background task runs.
loans:
enabled: true
max_active_per_player: 1 # concurrent loans per player
min_amount: 1
max_amount: 100000
min_installment: 1 # minimum per-installment payment
min_installment_by_amount: # raise the minimum for larger loans
'1000': 50
'5000': 250
max_installments: 60
default_interval_hours: 24 # time between installments
charge_check_seconds: 60 # how often to check for due payments
max_missed_payments: 3 # marked as defaulted beyond this
Default penalties
defaulted_effects:
enabled: true
refresh_seconds: 5
duration_seconds: 8
effects:
- SLOW:1
- SLOW_DIGGING:1
The format is EFFECT:level, with levels starting at 1. Effects are reapplied
periodically so they persist.
Usage
/loan or /vault loan opens the menu for requesting a loan, checking
status and repaying.
The due-payment scan runs asynchronously, but the actual charge is dispatched back to the main
thread — the Bukkit API is not thread safe.