付费签到 奖励系统自动结束时间 基金天数 是否可用点券购买如7ypay进行充值开通默认奖励 和 特定天数奖励 两种奖励配置方式gui.yml 进行自定义config.yml 进行自定义YAML 和 MySQL 两种数据存储方式插件特色:
灵活的基金配置系统,支持自定义多种不同天数的基金
例如:可以同时创建7天基金30天基金永久基金等
每个基金可以单独配置购买价格、奖励内容、自动结束时间等
玩家每天领取奖励时,会根据当前天数自动判断发放默认奖励还是特定奖励
支持GUI界面可视化操作,玩家体验流畅便捷
插件支持所有可以使用Bukkit插件的服务端,如果有无法使用请联系作者
XinxinPluginCore - 核心前置插件
PlaceholderAPI - 可选,用于变量支持
PlayerPoints - 可选,用于点券消费
XinxinRebate 或 xr 或 rebate —— 插件主命令/xr buy <基金ID> —— 购买指定基金/xr open <基金ID> —— 打开基金领取界面/xr claim <基金ID> —— 快速领取今日奖励(无需打开GUI)/xr help —— 查看帮助信息<> 为必填项,[] 可不填有默认值
/xr give <玩家> <基金ID> —— 给予指定玩家基金权限(无需购买)/xr remove <玩家> <基金ID> —— 删除指定玩家的基金权限/xr reload —— 重载插件配置文件xinxinrebate.use —— 使用基本命令的权限(默认:true)xinxinrebate.admin —— 管理员权限(默认:op)安装PlaceholderAPI后可使用以下变量:
%XinxinRebate_purchased_<基金ID>% —— 是否拥有指定基金(是/否)%XinxinRebate_current_<基金ID>% —— 当前已领取天数%XinxinRebate_remaining_<基金ID>% —— 剩余未领取天数%XinxinRebate_total_<基金ID>% —— 基金总天数%XinxinRebate_completed_<基金ID>% —— 基金完成次数%XinxinRebate_enddate_<基金ID>% —— 基金结束日期%XinxinRebate_price_<基金ID>% —— 基金购买价格变量使用示例:
假设你创建了一个ID为7天基金的基金,玩家变量会显示为:
%XinxinRebate_purchased_7天基金%→ "是"
%XinxinRebate_current_7天基金%→ "3"
%XinxinRebate_remaining_7天基金%→ "4"
将插件放入服务器plugins文件夹并填写好key后启动,会生成以下文件和文件夹:
config.yml—— 插件主配置文件,包含数据库设置、消息配置、基金配置gui.yml—— GUI界面配置文件,可自定义界面布局和物品显示key.yml—— 用于存放用户验证码playerData/—— 玩家数据储存文件夹(使用YAML存储时生成)
database:
# 存储类型: YAML 或 MYSQL
storage-type: YAML
# MySQL 配置 (当 storage-type 为 MYSQL 时生效)
mysql:
host: "localhost" # 数据库主机地址
port: 3306 # 数据库端口
database: "minecraft" # 数据库名称
username: "root" # 数据库用户名
password: "password" # 数据库密码
pool:
maximum-pool-size: 10 # 最大连接数
minimum-idle: 5 # 最小空闲连接数
connection-timeout: 30000 # 连接超时时间(毫秒)
table-prefix: "xinxinrebate_" # 表前缀
message:
# 消息前缀
prefix: "&8[&6返利基金&8] " # 普通玩家消息前缀
admin-prefix: "&8[&c管理员&8] " # 管理员消息前缀
permanent: "永久" # 永久显示文本
# 帮助消息(可自定义)
help:
- "&6========== &e新鑫返利基金 &6=========="
- "&e/xr buy <基金ID> &7- 购买基金"
- "&e/xr open <基金ID> &7- 打开基金界面"
- "&e/xr claim <基金ID> &7- 领取今日奖励"
- "&e/xr help &7- 查看帮助"
- "&6================================"
funds:
# 基金ID(自定义,用于命令和变量)
7天基金:
# 显示名称(玩家看到的名称)
display-name: "7天基金"
# 基金总天数
days: 7
# 购买价格(点券,需要PlayerPoints插件)
price: 100
# 是否开启购买功能(关闭后只能通过管理员给予)
buy-enabled: true
# 自动结束配置
auto-end:
enabled: true # 是否开启自动结束
days: 30 # 购买后多少天内需要完成领取
# 默认奖励(每天都会发放,除非设置了特定天数奖励)
default-reward:
# 领取时执行的命令(支持多个命令)
commands:
- "give %player% minecraft:diamond 1"
- "say %player% 领取了每日奖励!"
# 在界面奖励物品中显示的奖励说明
lore:
- "&d奖励列表:"
- " &e- 每天获得1个钻石"
# 特定天数奖励(会覆盖默认奖励)
specific-rewards:
# 第7天的特殊奖励
7:
commands:
- "give %player% minecraft:diamond_block 1"
- "say %player% 完成了7天基金的最终奖励!"
lore:
- "&6★ 最终奖励 ★"
- "&d奖励列表:"
- " &e- 钻石块 x1"
- " &e- 全服广播公告"
gui:
# GUI大小 (必须是9的倍数, 最大54)
size: 27
# 各种按钮和物品的槽位配置
buy-button-slot: 22 # 购买按钮槽位
info-slot: 8 # 个人信息物品槽位
prev-page-slot: 19 # 上一页按钮槽位
next-page-slot: 25 # 下一页按钮槽位
# 奖励物品显示槽位(可以设置多个)
reward-slots:
- 10
- 11
- 12
- 13
- 14
- 15
- 16
# 装饰物品槽位(填充界面空位)
decor-slots:
- 0
- 1
- 2
# ... 更多槽位
# 购买按钮配置(未拥有基金时显示)
buy-button:
type: "GOLD_INGOT"
name: "&6点击购买基金"
lore:
- "&7价格: &e%XinxinRebate_price_%fund%% &7点券"
- ""
- "&a点击购买此基金"
# 购买按钮配置(已拥有基金时显示)
buy-button-owned:
type: "EMERALD"
name: "&a已拥有基金"
lore:
- "&7当前进度: &e%XinxinRebate_current_%fund%%&7/&e%XinxinRebate_total_%fund%%"
- "&7剩余天数: &e%XinxinRebate_remaining_%fund%%"
- ""
- "&e完成后可再次购买"
# 奖励物品显示配置
claimed-item: # 已领取的奖励
type: "STAINED_GLASS_PANE"
data: 5
name: "&a第%day%天 &7(已领取)"
current-item: # 当前可领取的奖励
type: "STAINED_GLASS_PANE"
data: 4
name: "&e第%day%天 &7(可领取)"
wait-tomorrow-item: # 今日已领取,明日可领
type: "STAINED_GLASS_PANE"
data: 1
name: "&6第%day%天 &7(明日可领)"
locked-item: # 未解锁的奖励
type: "STAINED_GLASS_PANE"
data: 14
name: "&c第%day%天 &7(未解锁)"
首先确定你要创建的基金类型:
在 config.yml 的 funds: 部分添加你的基金配置:
funds:
# 复制这个模板创建新基金
你的基金ID:
display-name: "基金显示名称"
days: 7 # 基金天数
price: 100 # 购买价格
buy-enabled: true # 是否允许购买
auto-end:
enabled: false # 是否自动结束(以开通当天开始计算)
days: 30 # 有效期(天)
default-reward:
commands:
- "give %player% minecraft:diamond 1"
lore:
- "&d奖励列表:"
- " &e- 钻石 x1"
specific-rewards:
3:
commands:
- "give %player% minecraft:gold_ingot 5"
lore:
- "&b★ 第3天奖励 ★"
- " &e- 金锭 x5"
7:
commands:
- "give %player% minecraft:diamond_block 1"
lore:
- "&6★ 最终奖励 ★"
- " &e- 钻石块 x1"
在奖励命令中可以使用以下变量:
%player% —— 玩家名称%fund% —— 基金ID%day% —— 当前天数物品奖励:
commands:
- "give %player% minecraft:diamond 1"
- "give %player% minecraft:iron_ingot 64"
点券奖励(需要PlayerPoints):
commands:
- "points give %player% 100"
权限奖励(需要权限插件):
commands:
- "lp user %player% permission set vip.permission true"
全服广播:
commands:
- "say恭喜 %player% 完成了7天基金的最终奖励!"
- "title %player% title:&a恭喜! subtitle:&e获得最终奖励"
组合奖励:
commands:
- "give %player% minecraft:diamond 10"
- "points give %player% 50"
- "say %player% 获得了10钻石+50点券!"
配置完成后,使用以下命令重载插件:
/xr reload
funds:
新手7天:
display-name: "新手签到基金"
days: 7
price: 50
buy-enabled: true
auto-end:
enabled: true
days: 14
default-reward:
commands:
- "give %player% minecraft:bread 16"
- "give %player% minecraft:iron_ingot 8"
lore:
- "&d每日奖励:"
- " &e- 面包 x16"
- " &e- 铁锭 x8"
specific-rewards:
3:
commands:
- "give %player% minecraft:iron_pickaxe 1"
- "say %player% 获得了新手签到第3天奖励!"
lore:
- "&b★ 第3天奖励 ★"
- " &e- 铁镐 x1"
7:
commands:
- "give %player% minecraft:diamond 5"
- "give %player% minecraft:golden_apple 3"
- "say恭喜 %player% 完成新手7天签到!"
lore:
- "&6★ 最终奖励 ★"
- " &e- 钻石 x5"
- " &e- 金苹果 x3"
funds:
豪华30天:
display-name: "豪华月卡基金"
days: 30
price: 500
buy-enabled: true
auto-end:
enabled: false
default-reward:
commands:
- "give %player% minecraft:diamond 2"
- "points give %player% 20"
lore:
- "&d每日奖励:"
- " &e- 钻石 x2"
- " &e- 点券 +20"
specific-rewards:
7:
commands:
- "give %player% minecraft:diamond 10"
- "points give %player% 100"
lore:
- "&b★ 周奖励 ★"
- " &e- 钻石 x10"
- " &e- 点券 +100"
15:
commands:
- "give %player% minecraft:diamond_block 1"
- "give %player% minecraft:golden_apple 5"
lore:
- "&a★ 半月奖励 ★"
- " &e- 钻石块 x1"
- " &e- 金苹果 x5"
30:
commands:
- "give %player% minecraft:diamond_block 3"
- "points give %player% 500"
- "say恭喜 %player% 完成30天豪华基金!"
lore:
- "&6★ 最终奖励 ★"
- " &e- 钻石块 x3"
- " &e- 点券 +500"
funds:
VIP基金:
display-name: "VIP专属基金"
days: 30
price: 0
buy-enabled: false # 关闭购买,只能管理员给予
auto-end:
enabled: false
default-reward:
commands:
- "give %player% minecraft:diamond 5"
- "points give %player% 50"
- "say VIP玩家 %player% 领取了今日奖励"
lore:
- "&dVIP专属:"
- " &e- 钻石 x5"
- " &e- 点券 +50"
specific-rewards:
1:
commands:
- "lp user %player% parent add vip"
lore:
- "&6★ VIP权限 ★"
- " &e- 获得VIP组"
30:
commands:
- "give %player% minecraft:elytra 1"
- "say恭喜 %player% 获得VIP终极奖励鞘翅!"
lore:
- "&6★ 最终奖励 ★"
- " &e- 鞘翅 x1"
玩家使用以下命令购买基金:
/xr buy 7天基金
如果点券充足,会提示购买成功。
玩家使用以下命令打开基金界面:
/xr open 7天基金
界面会显示:
gui.yml自定义)
玩家可以:
/xr claim 7天基金
再次打开基金界面可以查看:
对于特殊玩家或活动奖励,可以直接给予基金权限:
/xr give 玩家名 VIP基金
这样玩家无需购买即可获得该基金的领取权限。
如果需要移除玩家的基金权限:
/xr remove 玩家名 7天基金
修改配置文件后,使用以下命令重载:
/xr reload
可以为特殊活动创建专属基金:
funds:
春节活动:
display-name: "春节限时基金"
days: 15
price: 299
buy-enabled: true
auto-end:
enabled: true
days: 20
default-reward:
commands:
- "give %player% minecraft:red_packet 1"
lore:
- "&d春节限定:"
- " &e- 红包 x1"
specific-rewards:
15:
commands:
- "give %player% special:firework 64"
- "say 恭喜 %player% 完成春节基金!"
lore:
- "&6★ 新年大礼包 ★"
A: 编辑 gui.yml 中的 size 参数,必须是9的倍数(如18、27、36、45、54)
A: 如果在基金配置中开启了 auto-end,则在指定天数内未完成领取会自动过期。如未开启则永不过期。
A: 可以!玩家完成一个基金的所有奖励领取后,可以再次购买该基金,完成次数会累加。
A: 将基金天数设置为 999 或更长天数即可创建永久有效的基金。
A: 支持!只要是服务端能识别的命令都可以写在奖励中。
A: 使用YAML存储时,备份 playerData 文件夹;使用MySQL存储时,备份 xinxinrebate_ 开头的表。
A: 检查以下几点: