BountyLite
适用于 Paper 服务器的轻量级赏金系统,拥有排序后的赏金菜单和下注对话框。
BountyLite 允许玩家互相悬赏。打开 /bounty 可以在一个从高到低排序的菜单中查看所有活跃的赏金,一键对某名玩家下注,并通过对话框发布新的赏金。击杀带有赏金的玩家后,可通过 Vault 领取赏金。
Paper 插件。 BountyLite 使用 paper-plugin.yml 和 Paper 的 Brigadier 命令 API,而非传统的 Bukkit/Spigot 命令系统。
功能
菜单与对话框
/bounty 打开一个按赏金金额从高到低列出所有赏金的菜单。
- 菜单会根据赏金数量调整大小,超过
gui.max-rows 时进行分页。
- 包含上一页、新赏金(底部居中)、下一页和搜索按钮。
- 点击玩家头像即可为其打开下注对话框。
- 无需离开菜单即可通过名称搜索玩家。
- 在没有 Dialog API 的服务器上,对话框会回退为可点击的聊天消息,该消息会自动填入
/bounty bet <player> <amount>。
- 当添加、更改或领取赏金时,菜单会实时刷新。
赏金机制
- 设置、追加、移除和查看赏金。
- 击杀带有赏金的玩家即可领取赏金,并伴有屏幕标题提示和音效。
- 提供
/bounty top 分页排行榜;条目可点击,聊天中的分页链接也可用。
- Tab 补全仅建议在线玩家;输入离线玩家名称时仍能正确解析。
- 支持 Vault 经济系统,具备余额检查和清晰的错误提示。
- 支持每位玩家的单次下注冷却时间、最小/最大下注金额,以及可选的赏金过期与退款机制。
- 当有新赏金针对某玩家发布时,该玩家会收到通知。
- 默认阻止同一 IP 下的领取行为,以防止小号刷取赏金。
集成支持
- 可选的 PlaceholderAPI 占位符,用于显示最高赏金、最高下注者和个别赏金信息。
服务器控制
- 默认使用 SQLite,可选 MySQL。
- 完全可编辑的
messages.yml,支持 MiniMessage、HEX 颜色及渐变效果。
- 更新时若缺少配置项或消息键,会自动添加。
- 支持权限控制,并可通过
/bounty reload 实现热重载。
/bounty info 显示作者、版本号和 API 版本。
依赖
|
|
| 服务端 |
Paper 1.21.11 – 26.x。基于 1.21.11 API 编译,使用 Java 21 字节码。 |
| 必需 |
Vault |
| 经济插件 |
任何兼容 Vault 的经济插件,例如 EssentialsX Economy |
| 可选 |
PlaceholderAPI 用于占位符支持 |
Vault 仅作为经济桥接使用。插件的所有代码均基于 Paper API。
安装
- 安装 Vault 和经济插件。
- 将
BountyLite-VERSION.jar 放入服务端的 plugins/ 文件夹并启动服务器。
- 编辑在
plugins/BountyLite/ 中生成的文件,然后运行 /bounty reload。
仅在文件缺失时写入默认文件。删除某个文件将以当前默认值重新生成它。
菜单
/bounty 打开赏金菜单。
| 按钮 |
位置 |
操作 |
| 玩家头像 |
顶部行 |
打开该玩家的下注对话框 |
| 搜索 |
左下角 |
打开搜索对话框 |
| 清除搜索 |
右下角 |
重新显示所有赏金(仅在搜索状态下可用) |
| 上一页 |
底行 |
返回上一页 |
| 新赏金 |
底部居中 |
打开新赏金对话框 |
| 下一页 |
底行 |
进入下一页 |
config.yml 中的菜单选项:
gui:
max-rows: 6
materials:
filler: GRAY_STAINED_GLASS_PANE
previous: ARROW
next: ARROW
new-bounty: EMERALD
empty: BARRIER
search: COMPASS
clear: BARRIER
config.yml 中的赏金、通知和领取行为:
anti-abuse:
# 当击杀者与受害者共享 IP 时阻止领取(防止小号刷取)。
block-same-ip: true
notifications:
# 告知玩家是否有赏金针对他们发布。
notify-target: true
claim:
# 在领取赏金时显示标题和播放音效。
title: true
sound: true
命令
显示所有命令
| 命令 |
描述 |
权限节点 |
/bounty |
打开赏金菜单 |
bounty.gui |
/bounty check <player> |
查看玩家的赏金 |
bounty.check |
/bounty bet <player> <amount> |
向赏金追加资金 |
bounty.bet |
/bounty set <player> <amount> |
设置赏金且不扣款 |
bounty.set |
/bounty remove <player> |
移除赏金 |
bounty.remove |
/bounty top [page] |
显示排行榜 |
bounty.top |
/bounty search <query> |
按玩家名称过滤打开菜单 |
bounty.gui |
/bounty info |
显示作者、版本和 API 版本 |
bounty.info |
/bounty reload |
重载消息和配置 |
bounty.reload |
权限
显示所有权限
| 权限节点 |
默认分配 |
描述 |
bounty.gui |
所有人 |
打开赏金菜单 |
bounty.check |
所有人 |
查看玩家赏金 |
bounty.bet |
所有人 |
向赏金追加资金 |
bounty.top |
所有人 |
查看排行榜 |
bounty.info |
所有人 |
查看插件信息 |
bounty.set |
管理员 |
设置赏金 |
bounty.remove |
管理员 |
移除赏金 |
bounty.reload |
管理员 |
重载消息和配置 |
PlaceholderAPI
显示所有占位符
如果已安装 PlaceholderAPI,BountyLite 会注册一个名为 bountylite 的扩展。<n> 表示从 1 开始的位置索引。
| 占位符 |
描述 |
%bountylite_top_<n>_name% |
赏金排行榜中位置 <n> 的玩家名称 |
%bountylite_top_<n>_amount% |
位置 <n> 的赏金金额 |
%bountylite_topbettor_<n>_name% |
最大投注排行榜中位置 <n> 的玩家名称 |
%bountylite_topbettor_<n>_amount% |
该玩家的总投注金额 |
%bountylite_bounty_<player>% |
某玩家当前的赏金金额 |
%bountylite_total% |
所有活跃赏金的总金额 |
超出列表范围的位置将返回空字符串。
控制台输出
启动时,BountyLite 会打印带有版本、作者、存储后端和活跃赏金数量的彩色横幅,随后显示每个挂钩的状态:
Vault: hooked (<provider>) 当存在经济提供商时。如果尚未注册任何提供商,它会在 2 秒后重试一次,如果仍找不到则发出警告。
PlaceholderAPI: hooked、not installed (optional)(未安装,可选)、registration rejected(注册被拒绝)或 failed to register expansion(扩展注册失败)。
- 启动失败时会以红色打印完整的堆栈跟踪,并自动禁用插件自身。
存储
显示所有存储信息
赏金数据存储在 SQL 表中。默认使用 SQLite:
plugins/BountyLite/bounties.db
要使用 MySQL,请编辑 config.yml:
storage:
type: mysql
table-prefix: 'bounty_'
mysql:
host: 'localhost'
port: 3306
database: 'bounty'
username: 'root'
password: 'your-password'
use-ssl: false
如果账户拥有权限,数据库会自动创建;否则需先手动创建。表将在启动时创建。
配置文件
| 文件 |
内容 |
config.yml |
存储设置、投注上限、反滥用机制、通知、领取特效及菜单选项 |
messages.yml |
所有面向玩家的消息和对话框文本,使用 MiniMessage 格式 |
缺失的配置项会在启动和 /bounty reload 时自动追加,现有内容永远不会被修改。
显示源码构建信息
从源码构建
git clone https://github.com/malusic23354/BountyLite.git
cd BountyLite
./gradlew build
插件 JAR 包将生成到 build/libs/ 目录中。
要运行本地测试服务器,请将 Paper JAR 放置在 run/paper.jar 并使用以下命令:
./gradlew runServer
支持
欢迎提交错误报告和拉取请求。报告问题时,请包含你的服务器版本、插件版本以及相关控制台输出。
BountyLite
A lightweight bounty system for Paper servers, with a sorted bounty menu and bet dialogs.
BountyLite lets players put money on each other's heads. Open /bounty to see every active bounty in a menu sorted from highest to lowest, bet on a player with one click, and place new bounties from a dialog. Whoever kills a player with a bounty collects it through Vault.
Paper plugin. BountyLite uses paper-plugin.yml and Paper's Brigadier command API, not the legacy Bukkit/Spigot command system.
Features
Menu and dialogs
/bounty opens a menu listing every bounty from highest to lowest amount.
- The menu resizes to the number of bounties and paginates past
gui.max-rows.
- Previous page, new bounty (bottom center), next page and search buttons.
- Click a player's head to open the bet dialog for them.
- Search for a player by name without leaving the menu.
- Dialogs fall back to a clickable chat message that fills in
/bounty bet <player> <amount> on servers without the Dialog API.
- The menu refreshes live when a bounty is added, changed or claimed.
Bounties
- Set, add to, remove and check bounties.
- Kill a player with a bounty to claim it, with an on-screen title and sound.
- Paginated leaderboard with
/bounty top; entries are clickable and page links work from chat.
- Tab completion suggests online players only; offline player names still resolve when typed.
- Vault economy support with balance checks and clear error messages.
- Per-player bet cooldown, minimum/maximum bets, and optional expiry with refunds.
- The victim is notified when a new bounty is placed on them.
- Same-IP claims are blocked by default to deter alt farming.
Integrations
- Optional PlaceholderAPI placeholders for the top bounties, top bettors and individual bounties.
Server control
- SQLite by default, MySQL optional.
- Fully editable
messages.yml with MiniMessage, HEX colors and gradients.
- Missing config and message keys are added automatically on update.
- Permission support and live reload with
/bounty reload.
/bounty info shows author, version and API version.
Requirements
|
|
| Server |
Paper 1.21.11 – 26.x. Compiled against the 1.21.11 API with Java 21 bytecode. |
| Required |
Vault |
| Economy |
A Vault-compatible economy plugin, such as EssentialsX Economy |
| Optional |
PlaceholderAPI for placeholders |
Vault is used only as the economy bridge. All plugin code uses Paper APIs.
Installation
- Install Vault and an economy plugin.
- Drop
BountyLite-VERSION.jar into your server's plugins/ folder and start the server.
- Edit the generated files in
plugins/BountyLite/, then run /bounty reload.
Default files are only written when missing. Delete a file to regenerate it with the current defaults.
Menu
/bounty opens the bounty menu.
| Button |
Position |
Action |
| Player head |
Top rows |
Opens the bet dialog for that player |
| Search |
Bottom left |
Opens the search dialog |
| Clear search |
Bottom right |
Shows all bounties again (only while searching) |
| Previous page |
Bottom row |
Goes back one page |
| New bounty |
Bottom center |
Opens the new bounty dialog |
| Next page |
Bottom row |
Goes forward one page |
Menu options in config.yml:
gui:
max-rows: 6
materials:
filler: GRAY_STAINED_GLASS_PANE
previous: ARROW
next: ARROW
new-bounty: EMERALD
empty: BARRIER
search: COMPASS
clear: BARRIER
Bounty, notification and claim behaviour in config.yml:
anti-abuse:
# Block claims when the killer and victim share an IP (deters alt farming).
block-same-ip: true
notifications:
# Tell players when a bounty is placed on them.
notify-target: true
claim:
# Show a title and play a sound when a bounty is claimed.
title: true
sound: true
Commands
Show all commands
| Command |
Description |
Permission |
/bounty |
Open the bounty menu |
bounty.gui |
/bounty check <player> |
Check a player's bounty |
bounty.check |
/bounty bet <player> <amount> |
Add money to a bounty |
bounty.bet |
/bounty set <player> <amount> |
Set a bounty without paying |
bounty.set |
/bounty remove <player> |
Remove a bounty |
bounty.remove |
/bounty top [page] |
Show the leaderboard |
bounty.top |
/bounty search <query> |
Open the menu filtered by player name |
bounty.gui |
/bounty info |
Show author, version and API version |
bounty.info |
/bounty reload |
Reload messages and config |
bounty.reload |
Permissions
Show all permissions
| Permission |
Default |
Description |
bounty.gui |
Everyone |
Open the bounty menu |
bounty.check |
Everyone |
Check player bounties |
bounty.bet |
Everyone |
Add money to bounties |
bounty.top |
Everyone |
View the leaderboard |
bounty.info |
Everyone |
View plugin information |
bounty.set |
Operators |
Set bounties |
bounty.remove |
Operators |
Remove bounties |
bounty.reload |
Operators |
Reload messages and config |
PlaceholderAPI
Show all Placeholders
If PlaceholderAPI is installed, BountyLite registers a bountylite expansion. <n> is a 1-based position.
| Placeholder |
Description |
%bountylite_top_<n>_name% |
Name of the player at position <n> on the bounty leaderboard |
%bountylite_top_<n>_amount% |
Bounty amount at position <n> |
%bountylite_topbettor_<n>_name% |
Name of the player at position <n> on the top bettors list |
%bountylite_topbettor_<n>_amount% |
Total amount bet by that player |
%bountylite_bounty_<player>% |
Current bounty on a player |
%bountylite_total% |
Total of all active bounties |
Positions outside the list return an empty string.
Console output
On startup BountyLite prints a colored banner with the version, author, storage backend and number of active bounties, followed by the status of each hook:
Vault: hooked (<provider>) when an economy provider is available. If none is registered yet, it retries once after 2 seconds and warns if it still cannot find one.
PlaceholderAPI: hooked, not installed (optional), registration rejected or failed to register expansion.
- Startup failures are printed in red with the full stack trace, and the plugin disables itself cleanly.
Storage
Show all storage info
Bounties are stored in a SQL table. SQLite is the default:
plugins/BountyLite/bounties.db
To use MySQL, edit config.yml:
storage:
type: mysql
table-prefix: 'bounty_'
mysql:
host: 'localhost'
port: 3306
database: 'bounty'
username: 'root'
password: 'your-password'
use-ssl: false
The database is created automatically if the account has permission; otherwise create it manually first. The table is created on startup.
Configuration files
| File |
Contents |
config.yml |
Storage, bet limits, anti-abuse, notifications, claim effects and menu options |
messages.yml |
Every player-facing message and dialog text, using MiniMessage |
Missing options are appended automatically on start and /bounty reload; existing content is never changed.
Show building from source info
Building from source
git clone https://github.com/malusic23354/BountyLite.git
cd BountyLite
./gradlew build
The plugin JAR is written to build/libs/.
To run a local test server, place a Paper JAR at run/paper.jar and use:
./gradlew runServer
Support
Bug reports and pull requests are welcome. When reporting a problem, include your server version, plugin version and the relevant console output.
评论 0
登录后参与评分
还没有评论,来抢沙发吧