累计赞助
累计赞助用于按玩家已支付金额发放阶段奖励。一个服务器可以同时配置多套统计方式,例如:
- 永久累计赞助。
- 每周累计赞助。
- 每月累计赞助。
- 每年累计赞助。
- 指定活动时间累计赞助。
配置文件:
text
plugins/GTPay/sponsorship.yml累计金额使用订单的基础金额,不包含用于识别订单的 0.01、0.02 分币。
永久累计赞助
yaml
lifetime:
name: "永久累计赞助"
enabled: true
period: lifetime
timezone: "Asia/Shanghai"
count_topup: true
count_gifts: true
rewards:
100:
name: "累计赞助 100 元"
commands:
- "[console] lp user {player} permission set gtpay.sponsor.100 true"
500:
name: "累计赞助 500 元"
commands:
- "[console] lp user {player} permission set gtpay.sponsor.500 true"lifetime 是方案 ID。
玩家查看:
text
/gtpay sponsor lifetime领取 100 元档位:
text
/gtpay sponsor claim lifetime 100每周累计赞助
yaml
weekly:
name: "本周累计赞助"
enabled: true
period: weekly
timezone: "Asia/Shanghai"
count_topup: true
count_gifts: true
rewards:
50:
name: "本周赞助 50 元"
commands:
- "[console] points give {player} 5"
100:
name: "本周赞助 100 元"
commands:
- "[console] points give {player} 15"每周从周一 00:00 开始,到下周一 00:00 结束。
同一档奖励每周只能领取一次。进入新一周后会使用新的统计周期和领取记录。
每月累计赞助
yaml
monthly:
name: "本月累计赞助"
enabled: true
period: monthly
timezone: "Asia/Shanghai"
count_topup: true
count_gifts: true
rewards:
100:
name: "月累计 100 元"
commands:
- "[console] points give {player} 10"
300:
name: "月累计 300 元"
commands:
- "[console] points give {player} 50"每月从当月 1 日 00:00 开始,到下月 1 日 00:00 结束。
每日与每年
每日:
yaml
period: daily每年:
yaml
period: yearly可用周期:
| 值 | 统计范围 |
|---|---|
lifetime | 永久累计 |
daily | 当天 |
weekly | 本周,周一开始 |
monthly | 当月 |
yearly | 当年 |
event | 指定开始和结束时间 |
活动累计赞助
yaml
summer_2026:
name: "暑期累计赞助"
enabled: true
period: event
start: "2026-08-01 00:00:00"
end: "2026-08-31 23:59:59"
timezone: "Asia/Shanghai"
count_topup: true
count_gifts: true
rewards:
100:
name: "暑期累计 100 元"
commands:
- "[console] points give {player} 20"
300:
name: "暑期累计 300 元"
commands:
- "[console] points give {player} 80"活动开始前和结束后不再统计该方案,也不能领取该活动档位。
时间格式支持:
text
yyyy-MM-dd HH:mm:ss也可以使用带时区的 ISO 时间。
只统计点券或礼包
只统计点券充值:
yaml
count_topup: true
count_gifts: false只统计礼包:
yaml
count_topup: false
count_gifts: true两种都统计:
yaml
count_topup: true
count_gifts: true方案字段
| 配置 | 说明 |
|---|---|
name | 方案显示名称 |
enabled | 是否启用 |
period | 统计周期 |
timezone | 周期时区,国内服务器使用 Asia/Shanghai |
start | 活动开始时间,仅 event 使用 |
end | 活动结束时间,仅 event 使用 |
count_topup | 是否统计点券订单 |
count_gifts | 是否统计礼包订单 |
rewards | 金额档位和奖励命令 |
奖励变量
累计赞助奖励命令支持:
| 变量 | 内容 |
|---|---|
{player} | 玩家名 |
{uuid} | 玩家 UUID |
{scheme} | 方案 ID |
{threshold} | 当前领取档位 |
{total} | 当前周期累计金额 |
{rank} | 当前周期排名 |
{reward} | 奖励名称 |
示例:
yaml
commands:
- "[console] points give {player} 100"
- "[console] broadcast &6{player} &f领取了 &e{reward}"GUI 领取
GUI 按钮动作:
yaml
actions:
- "[claim] lifetime 100"月累计 300 元:
yaml
actions:
- "[claim] monthly 300"按钮名称和 Lore 可以使用 PAPI 变量显示当前金额、下一档和剩余金额。
修改 sponsorship.yml 后执行 /gtpay reload,新的周期和档位从重载后生效。
