- ◆ 支持核心
- Spigot,PaperSpigot
- ◆ 游戏版本
- 1.21 1.20 1.19 1.18 1.17 1.16 1.15 1.14 1.13 1.12
PlayerBalance 是一款轻量、好用的多货币插件,支持玩家余额管理、转账、排行、操作日志,并提供 SQLite/MySQL 两种存储方式。插件完美兼容 Spigot/Paper 1.12+(已在 1.21.11 测试通过),既可独立使用,也可通过 Vault 经济接口与其他插件(如商店、地皮等)无缝对接。
特性
多货币系统:支持自定义多种货币(如金币、点券、宝石等),每种货币可独立设置显示名、符号、默认值。
灵活存储:可选择 SQLite(本地文件)或 MySQL(跨服共享)存储数据。
游戏与数据库实时互通,不管改哪一方,全部都可以自动同步。
为各位腐竹的服务器官网开发做足了充分的准备。
Vault 可选:可在配置中开启 Vault 经济接口,绑定一种货币供其他插件调用(不装 Vault 不影响使用)。
别名:/pb、/pbal
特性
多货币系统:支持自定义多种货币(如金币、点券、宝石等),每种货币可独立设置显示名、符号、默认值。
灵活存储:可选择 SQLite(本地文件)或 MySQL(跨服共享)存储数据。
游戏与数据库实时互通,不管改哪一方,全部都可以自动同步。
为各位腐竹的服务器官网开发做足了充分的准备。
Vault 可选:可在配置中开启 Vault 经济接口,绑定一种货币供其他插件调用(不装 Vault 不影响使用)。
命令列表
主命令:/playerbalance别名:/pb、/pbal
| 命令 | 描述 | 所需权限 |
|---|---|---|
| /pb help | 查看帮助 | playerbalance.cmd.help |
| /pb look | 查看自己所有货币余额 | playerbalance.cmd.look.self |
| /pb look <货币> | 查看自己指定货币余额 | playerbalance.cmd.look.self |
| /pb look player <玩家> [货币] | 查看指定玩家余额(不写货币则显示全部) | playerbalance.cmd.look.player |
| /pb look online [货币] | 查看当前在线玩家该货币余额列表 | playerbalance.cmd.look.online |
| /pb look all [货币] [页码] | 查看全服所有记录玩家的余额列表(分页) | playerbalance.cmd.look.all |
| /pb look total [货币] | 查看全服该货币总量 | playerbalance.cmd.look.total |
| /pb balance [货币] | 查自己余额(默认货币) | playerbalance.cmd.balance.self |
| /pb balance [货币] <玩家> | 查询其他玩家余额 | playerbalance.cmd.balance.other |
| /pb bal [货币] [玩家] | 同上(别名) | playerbalance.cmd.balance.self(查自己)/ playerbalance.cmd.balance.other(查他人) |
| /pb pay <玩家> <货币> <数量> | 向其他玩家转账(扣除手续费) | playerbalance.cmd.pay |
| /pb give <玩家> <货币> <数量> [原因] | 给予玩家货币 | playerbalance.cmd.give |
| /pb take <玩家> <货币> <数量> [原因] | 扣除玩家货币 | playerbalance.cmd.take |
| /pb set <玩家> <货币> <数量> [原因] | 设置玩家货币余额 | playerbalance.cmd.set |
| /pb giveall <货币> <数量> [原因] | 给所有在线玩家增加货币 | playerbalance.cmd.giveall |
| /pb setall <货币> <数量> [原因] | 设置所有在线玩家货币余额 | playerbalance.cmd.setall |
| /pb takeall <货币> <数量> [原因] | 扣除所有在线玩家货币 | playerbalance.cmd.takeall |
| /pb top <货币> [页码] | 查看货币排行榜(按余额降序) | playerbalance.cmd.top |
| /pb log <玩家> [页码] | 查看玩家所有操作日志 | playerbalance.cmd.log |
| /pb givlog <玩家> [页码] | 只查看玩家的“给予”类日志 | playerbalance.cmd.givlog |
| /pb clear <货币> all | 清空全服该货币的数据 | playerbalance.cmd.clear.all |
| /pb clear <货币> <玩家> | 清空指定玩家的该货币数据 | playerbalance.cmd.clear.player |
| /pb reload | 重载配置和语言文件 | playerbalance.cmd.reload |
权限节点列表
| 权限节点 | 默认值 | 描述 |
|---|---|---|
| playerbalance.cmd.help | true | 查看帮助 |
| playerbalance.cmd.reload | op | 重载配置 |
| playerbalance.cmd.look.self | true | 查看自己余额(所有货币/单货币) |
| playerbalance.cmd.look.player | op | 查看其他玩家余额 |
| playerbalance.cmd.look.online | op | 查看在线玩家余额列表 |
| playerbalance.cmd.look.all | op | 查看全服记录玩家余额列表 |
| playerbalance.cmd.look.total | op | 查看全服货币总量 |
| playerbalance.cmd.balance.self | true | 使用 /pb balance 查自己 |
| playerbalance.cmd.balance.other | op | 使用 /pb balance 查他人 |
| playerbalance.cmd.pay | true | 玩家间转账 |
| playerbalance.cmd.give | op | 给予货币 |
| playerbalance.cmd.take | op | 扣除货币 |
| playerbalance.cmd.set | op | 设置货币 |
| playerbalance.cmd.giveall | op | 在线批量给予 |
| playerbalance.cmd.setall | op | 在线批量设置 |
| playerbalance.cmd.takeall | op | 在线批量扣除 |
| playerbalance.cmd.top | op | 查看排行榜 |
| playerbalance.cmd.log | op | 查看玩家日志 |
| playerbalance.cmd.givlog | op | 查看玩家给予日志 |
| playerbalance.cmd.clear.player | op | 清空玩家某货币 |
| playerbalance.cmd.clear.all | op | 清空全服某货币 |
| playerbalance.cmd.* | false | 拥有所有命令权限(包括 admin 级别) |
| playerbalance.admin.* | false | 拥有所有管理命令权限(不包括玩家基本命令) |
Vault 经济对接指南
1. 安装 Vault
在服务器插件文件夹放入 Vault 插件,重启服务器。2. 工作原理
- 插件会通过动态代理注册一个 Vault 经济实现,仅操作配置中指定的货币。
- 其他插件(如商店插件)通过 Vault API 调用时,将读写该货币的余额。
- 所有操作(存款、取款)都会被记录到日志中,动作类型为 VAULT_DEPOSIT / VAULT_WITHDRAW。
3. 注意事项
- 如果服务器未安装 Vault,或配置中 vault.enabled: false,插件不会注册经济接口,不会产生任何错误。
- Vault 接口仅处理一种货币,若需要多货币对接,可使用不同插件的经济接口(如某些商店插件支持自定义经济)。
目前版本:1.0.6(发布版)
- 修复 SQLite 建表时 AUTOINCREMENT 异常(自动检测并重建日志表)。
- 优化 Vault 代理实现,避免类加载冲突。
- 完善权限拆分,每个命令独立权限。
- 增加 look 系列命令,支持查看玩家、在线、全服、总量。