
LotteryReloaded
一款面向 Paper 的现代、公平的服务端抽奖插件。
玩家使用游戏内货币购买彩票,奖池随之增长,并在设定的间隔或固定时间点抽取一名中奖者,其中奖概率与其持有的彩票数量成正比。
✨ 为什么选择 LotteryReloaded
这是对经典 Lottery 插件的从头重写版本,专为当前版本的 Paper 构建:所有消息均使用 MiniMessage,命令基于 Brigadier,GUI 采用持有者模式,且抽奖过程完全在主线程运行,确保数据文件不会因并发更新而损坏。
抽奖过程真正公平——你的中奖几率精确等于你持有的彩票占总票数的比例——并且你可以通过内置的模拟命令来验证这一点。
?️ 功能特性
- 加权抽奖 — 购买更多彩票,获得更高的中奖几率。简单直接,不多不少。
- 两种抽奖模式 — 重复间隔(每 N 分钟)或一天中的固定时间。
- 完整的经济循环 — 可配置的门票价格、奖池贡献率、固定奖金、上缴至服务器账户的税款,以及在取消抽奖时退还的单张彩票费用。
- “未中奖”机制 — 可选地让部分奖池在抽奖未产生中奖者时滚存到下一轮,营造累积大奖的感觉。
- 按权限组限制票数 — 针对不同权限设置不同的上限,并支持购买冷却时间。
- 离线中奖处理 — 当玩家下次上线时,将支付奖金并通知他们已中奖。
- 可配置 GUI — 主菜单和分页的“所有玩家”视图,均可完全编辑。
- 抽奖历史记录 —
/lottery history 显示最近的中奖者和奖池情况。
- 中奖 / 未中奖 / 提醒命令,可切换购买和提醒消息,以及 Modrinth 更新检查。
- PlaceholderAPI 支持,可用于记分板、Tab 列表和全息显示。
? 依赖要求
|
|
| 服务端 |
Paper (API 26.1.2+) |
| Java |
25 |
| 必需 |
Vault + 经济提供商 (EssentialsX Economy, CMI, …) |
| 可选 |
PlaceholderAPI |
将 jar 包放入 plugins/ 目录,启动服务器,编辑生成的配置文件,然后运行 /lottery reload。如果未找到任何经济系统,插件会显示明确消息并自动禁用自身。
⌨️ 命令
/lottery (别名 /lotto)
| 命令 |
功能 |
/lottery buy [number] |
购买彩票(默认为 1 张) |
/lottery status |
查看你的彩票、奖池金额、距离下一次抽奖的时间、上次中奖者 |
/lottery gui |
打开抽奖菜单 |
/lottery history |
查看最近的抽奖记录 |
/lottery togglebuymsg |
静音/取消静音其他玩家的购买消息 |
/lottery toggleremindmsg |
静音/取消静音提醒消息 |
管理员命令
| 命令 |
功能 |
/lottery draw |
立即强制进行一次抽奖 |
/lottery addpot [number] |
向奖池添加资金 |
/lottery reload |
重新加载配置和消息文件 |
/lottery admin |
管理员帮助信息 |
/lottery testdraw [iterations] |
多次模拟抽奖并报告中奖分布 —— 证明抽奖是公平的,不实际支付任何人 |
? 权限节点
每个节点默认均为 operator(操作员),因此请通过 LuckPerms(或将其设置为 true)授予玩家所需的权限。两个捆绑节点可以简化此操作:
lottery.player.all → buy, status, gui, history
lottery.admin.all → draw, reload, addpot, admin
所有节点
| 节点 |
授予权限 |
lottery.buy |
/lottery buy |
lottery.status |
/lottery status |
lottery.gui |
/lottery gui |
lottery.history |
/lottery history |
lottery.draw |
/lottery draw |
lottery.reload |
/lottery reload |
lottery.addpot |
/lottery addpot |
lottery.admin |
/lottery admin, /lottery testdraw |
lottery.cooldown.bypass |
跳过购买冷却时间 |
lottery.ticketlimit.bypass |
忽略票数限制 |
lottery.ticketlimit.<rank> |
针对特定权限组的更高票数上限 |
? PlaceholderAPI
%lottery_drawtime% 距离下一次抽奖的时间(实时倒计时)
%lottery_pot% 当前奖池金额
%lottery_gtickets% 本轮总彩票数
%lottery_ptickets% 你持有的彩票数
%lottery_winner% 上一次的中奖者
⚙️ 配置概览
所有设置均在 config.yml 中,所有文本均为 MiniMessage 格式(位于 messages.yml,支持颜色、渐变、十六进制色值 —— 并通过 <papi:'id'> 支持其他插件的占位符)。亮点包括:
- 在间隔抽奖和固定每日抽奖时间之间切换。
- 设置门票价格、奖池贡献率、固定奖金、税率以及服务器税收账户。
- 调整最少参与人数、各权限组的票数限制以及购买冷却时间。
- 启用“未中奖”机制,并配置奖池滚存比例。
- 在中奖、未中奖或每次提醒时运行控制台命令。
gui.yml 和 globaltickets.yml 中的菜单可完全编辑 —— 材质、槽位、名称、描述以及每个按钮的功能。
? 支持
如果遇到错误或有任何请求,请提交 Issue。
LotteryReloaded —— 公平的抽奖,简洁的配置,现代化的 Paper 体验。

LotteryReloaded
A modern, fair, server-side lottery for Paper.
Players buy tickets with in-game money, the pot grows, and at set intervals — or fixed times of day — a winner is drawn with odds proportional to the tickets they hold.
✨ Why LotteryReloaded
A ground-up rewrite of the classic Lottery plugin, rebuilt for current Paper: MiniMessage for every message, Brigadier commands, a holder-based GUI, and a draw that runs entirely on the main thread so your data file can't be corrupted by overlapping updates.
The draw is genuinely fair — your chance is exactly proportional to your share of the tickets — and you can prove it with a built-in simulation command.
?️ Features
- Weighted draws — buy more tickets, get better odds. Nothing more, nothing less.
- Two draw modes — a repeating interval (every N minutes) or fixed times of day.
- A real economy loop — configurable ticket cost, pot contribution, a flat pot bonus, taxes to a server account, and per-ticket refunds when a draw is cancelled.
- No-win chance — optionally let a draw roll part of the pot over to the next round for a building-jackpot feel.
- Per-rank ticket limits — different caps per permission, plus a buy cooldown.
- Offline winners are paid and notified the next time they log in.
- Configurable GUI — a main menu and a paginated "all players" view, fully editable.
- Draw history —
/lottery history shows the most recent winners and pots.
- Win / no-win / reminder commands, toggleable buy and reminder messages, and a Modrinth update check.
- PlaceholderAPI support for scoreboards, tab lists, and holograms.
? Requirements
|
|
| Server |
Paper (API 26.1.2+) |
| Java |
25 |
| Required |
Vault + an economy provider (EssentialsX Economy, CMI, …) |
| Optional |
PlaceholderAPI |
Drop the jar in plugins/, start the server, edit the generated files, and run /lottery reload. The plugin disables itself with a clear message if no economy is found.
⌨️ Commands
/lottery (alias /lotto)
| Command |
What it does |
/lottery buy [number] |
Buy tickets (default 1) |
/lottery status |
Your tickets, the pot, time until the draw, last winner |
/lottery gui |
Open the lottery menu |
/lottery history |
The most recent draws |
/lottery togglebuymsg |
Mute/unmute others' buy messages |
/lottery toggleremindmsg |
Mute/unmute reminders |
Admin commands
| Command |
What it does |
/lottery draw |
Force a draw now |
/lottery addpot [number] |
Add money to the pot |
/lottery reload |
Reload config + messages |
/lottery admin |
Admin help |
/lottery testdraw [iterations] |
Simulate the draw many times and report the win distribution — proves the draw is fair, pays no one |
? Permissions
Every node defaults to operator, so grant what your players need through LuckPerms (or set them to true). Two bundle nodes make this easy:
lottery.player.all → buy, status, gui, history
lottery.admin.all → draw, reload, addpot, admin
All nodes
| Node |
Grants |
lottery.buy |
/lottery buy |
lottery.status |
/lottery status |
lottery.gui |
/lottery gui |
lottery.history |
/lottery history |
lottery.draw |
/lottery draw |
lottery.reload |
/lottery reload |
lottery.addpot |
/lottery addpot |
lottery.admin |
/lottery admin, /lottery testdraw |
lottery.cooldown.bypass |
Skip the buy cooldown |
lottery.ticketlimit.bypass |
Ignore the ticket limit |
lottery.ticketlimit.<rank> |
A higher per-rank ticket limit |
? PlaceholderAPI
%lottery_drawtime% time until the next draw (counts down live)
%lottery_pot% the current pot
%lottery_gtickets% total tickets this round
%lottery_ptickets% your tickets
%lottery_winner% the last winner
⚙️ Configuration at a glance
Everything is in config.yml, and all text is MiniMessage in messages.yml (colours, gradients, hex — and other plugins' placeholders via <papi:'id'>). Highlights:
- Switch between interval draws and fixed daily draw times.
- Set ticket cost, pot contribution, a flat pot bonus, tax percentage, and the server tax account.
- Tune the minimum players, ticket limits per rank, and the buy cooldown.
- Enable a no-win chance with a configurable pot rollover.
- Run console commands on a win, a no-win, or each reminder.
The menus in gui.yml and globaltickets.yml are fully editable — materials, slots, names, lore, and what each button does.
? Support
- ? Full documentation: see the Wiki
If you hit a bug or have a request, open an issue.
LotteryReloaded — fair draws, clean config, modern Paper.
评论 0
登录后参与评分
还没有评论,来抢沙发吧