ModNVote
以隐私为先,基于 GUI 的 PaperMC 1.21.x 社区投票插件
ModNVote 是一款现代化的 Minecraft 社区投票与民意调查插件,旨在让玩家轻松参与、让管理员实用操作,并支持事后验证。
ModNVote 2.x 取代了原本仅支持“是/否”的工作流程,引入了完整的民意调查生命周期系统,支持:
- 排名制单选民意调查
- 是/否民意调查
- 基于图形界面(GUI)的民意调查创建与编辑
- 民意调查克隆,用于重复使用或基于模板的调查
- 匿名选票存储
- 将参与记录与投票内容分离追踪
- 选票证明短语验证
- 防篡改审计与完整性检查
- 通过兼容 Discord 的网络钩子(Webhook)可选地发布外部见证信息
- 手动和自动发布完整性检查点
- 兼容 Java 版/基岩版的库存界面
- 提交前强制确认投票
/poll 作为 /modnvote 的简短别名
专为 PaperMC 1.21.x 和 Java 21 构建。
ModNVote 是 PineVote 的精神续作,在 MODN METL 品牌下重新构建,更加专注于隐私、透明度和完整性。
主要功能
GUI 民意调查构建器
管理员可以通过库存图形界面(GUI)创建和编辑民意调查,而非依赖一系列冗长的设置命令。
支持的构建器流程:
/modnvote create ranked_single_winner <optionCount>
/modnvote create yes_no
/modnvote edit <draftPollId>
也可以使用更短的别名:
/poll create ranked_single_winner <optionCount>
/poll create yes_no
/poll edit <draftPollId>
构建器允许管理员配置以下内容:
- 民意调查标题
- 民意调查描述
- 选项名称
- 选项描述
- 排名制民意调查的部分排名行为
- 排名制民意调查的最大排名数量
字段使用清晰的红色/绿色完成状态指示器:
当民意调查有效时,“READY”控件变为绿色,即可将其暂存以开放投票。
民意调查克隆
管理员可以将现有的民意调查克隆为一个新的可编辑草稿:
/modnvote clone <sourcePollId>
这对于需要重复使用的民意调查非常有用,其中某些选项、措辞或设置可以复用。
克隆会复制民意调查定义和选项,但不会复制选票、参与记录、生命周期时间戳、证明短语或审计历史。
排名制单选民意调查
排名制民意调查允许玩家按偏好对选项进行排序。
管理员可以使用以下命令创建排名制民意调查:
/modnvote create ranked_single_winner 5
玩家随后通过图形界面使用以下命令进行投票:
/modnvote vote <pollId>
排名制投票包括:
- 点击以对选项进行排名
- 稳定的纸张风格选项图标
- 显示当前排名的工具提示文本
- 可选的部分排名支持
- 可配置的最大排名数量
- 投出选票前强制审查/确认
是/否民意调查
是/否民意调查仍完全受支持,现已成为 2.x 民意调查生命周期的一部分。
管理员可以使用以下命令创建:
/modnvote create yes_no
该插件在支持新版 GUI 设置和生命周期流程的同时,使用受保护的规范“是”和“否”选项。
匿名投票
ModNVote 围绕一条核心规则构建:
匿名投票是投票内容的唯一真实来源。
该插件有意将以下内容分离开来:
| 数据 |
用途 |
| 匿名投票 |
存储投票内容并驱动结果计算 |
| 参与记录 |
追踪谁参与了投票并防止重复投票 |
| 审计记录 |
提供生命周期和完整性证据 |
| 证明短语 |
让玩家在不暴露身份关联的情况下验证投票 |
这意味着结果仅基于匿名投票进行计算,而非基于包含身份信息的参与记录。
在不泄露投票内容的情况下进行验证
玩家可以验证自己的参与情况:
/modnvote verify participation <pollId>
这会确认其参与是否已被记录,而不会泄露他们的投票选择。
玩家还可以验证投票证明短语:
/modnvote verify ballot <pollId> <proofPhrase>
证明短语类似于持有者令牌。任何拥有该短语的人都可以验证该投票引用,因此玩家应保持其私密性。
审计、完整性检查与见证发布
ModNVote 的设计旨在使篡改行为可被检测。
完整性功能包括:
- 匿名投票哈希检查
- 投票证明承诺检查
- 参与包含性检查
- 投票生命周期审计记录
- 审计链验证
- 仅基于匿名投票的结果计算
- 可选的见证检查点发布
ModNVote 可以向配置好的兼容 Discord 的 Webhook 发布隐私安全的见证事件。
支持的见证事件包括:
- 投票开启
- 投票关闭,包括公开的结果摘要
- 每配置数量的已接受投票自动进行的完整性检查点
- 通过以下命令手动进行的完整性检查点:
/modnvote checkpoint <pollId>
见证发布不会公布玩家名称、UUID、IP 地址、证明短语、参与收据或每位玩家的投票内容。
Webhook 投递采用尽力而为且非阻塞的方式。Webhook 失败不会取消投票、投票开启、投票关闭、检查点操作或持久化保存。
对 Java 版与基岩版友好的 GUI
GUI 刻意避免使用装饰性的玻璃面板。
这使得界面更简单,并与基岩版玩家保持更好的兼容性,同时通过以下方式提供清晰的交互提示:
- 物品名称
- 物品描述(lore)
- 换行包裹的多行描述
- 红/绿色构建状态指示
- 确认屏幕
主要命令
所有命令均以以下命令为根路径:
/modnvote
也提供了更短的别名:
/poll
管理员工作流程
/modnvote 指南
/modnvote create ranked_single_winner <选项数量>
/modnvote create yes_no
/modnvote edit <草稿投票ID>
/modnvote clone <源投票ID>
/modnvote list
/modnvote show <投票ID>
/modnvote delete <投票ID>
/modnvote open <投票ID>
/modnvote close <投票ID>
/modnvote result <投票ID>
/modnvote checkpoint <投票ID>
玩家工作流程
/modnvote vote <pollId>
/modnvote mypolls
/modnvote verify participation <pollId>
/modnvote verify ballot <pollId> <proofPhrase>
实用命令
/modnvote status
/modnvote reload
以上所有示例也可以使用 /poll 代替 /modnvote 来运行。
一些较旧的底层设置命令可能仍可作为恢复工具调用,但正常的投票设置应使用 GUI 构建器。
隐私模型
ModNVote 避免将投票者身份与投票内容存储在一起。
参与记录是感知身份的,因为插件需要知道谁已经投过票了。匿名选票则存储投票内容。这两个系统是故意分离的。
这使得插件能够:
- 防止重复投票
- 验证玩家是否已参与
- 根据选票内容计算结果
- 避免暴露特定玩家的具体投票选项
/modnvote verify participation 不得泄露投票内容。
/modnvote result 必须仅使用匿名选票。
外部见证人发布仅限于投票级别,不得泄露针对特定玩家的投票数据。
投票生命周期
投票会经历明确的状态转换:
DRAFT -> READY -> OPEN -> CLOSED
典型流程如下:
create -> edit in builder -> mark READY -> open -> players vote -> close -> result
处于 DRAFT(草稿)状态的投票可以在投票构建器中编辑。处于 READY(就绪)状态的投票可以开启。处于 OPEN(开放)状态的投票接受投票。处于 CLOSED(关闭)状态的投票可以公布结果。
Webhook 配置
Webhook 发布在 plugins/ModNVote/config.yml 中进行配置。
单个 Webhook 应配置为 YAML 列表格式:
publication:
discord_webhooks:
- "https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN"
publish_poll_opened: true
publish_poll_closed: true
publish_checkpoints: true
integrity:
checkpoint_interval_ballots: 25
使用 discord_webhooks: [] 可禁用 Webhook 发布功能。
通过添加更多的 - ... 行来支持多个 Webhook。
切勿将真实的 Webhook URL 提交到源代码管理中。
PlaceholderAPI
PlaceholderAPI 支持曾是旧版 1.x 插件的一部分。
对于 ModNVote 2.x,请在生产环境的仪表板中使用占位符之前,查阅当前的发行说明和仓库文档以获取最新的 PlaceholderAPI 状态信息。
要求
- 服务器: PaperMC 1.21.x
- Java: 21
- 数据库: SQLite
- 可选: PlaceholderAPI(在当前版本支持的情况下)
安装
- 下载最新的
modnvote-*.jar 文件。
- 将其放入服务器的
plugins 文件夹中。
- 重启服务器。
- 使用你的权限插件配置权限。
- 使用以下命令创建测试投票:
/modnvote create yes_no
或者:
/modnvote create ranked_single_winner 3
ModNVote 2.x 是一个全新安装的版本。目前不支持从旧版 1.x 数据库迁移。
权限
权限在 plugin.yml 中定义。
常见权限包括:
modnvote.admin.poll.create
modnvote.admin.poll.list
modnvote.admin.poll.open
modnvote.admin.poll.close
modnvote.admin.reload
modnvote.verify
modnvote.testvote
防重复投票的绕过支持仍可通过插件配置进行设置。
路线图
潜在的 2.x 未来工作包括:
- 多选 STV(单票可转移制)
- 组合选举,例如市长 + 议会
- 可导出的签名审计快照
- 高级报告与仪表板
- 专用的 GUI 删除确认流程
- 额外的管理员透明度工具
- 超越 Discord 兼容 Webhook 的多目标见证人发布
许可证与致谢
- 许可证:MIT
- 版权所有:MODN METL LTD
- 开发者:Jamie E. Thompson (@jamjet3)
- 社区测试:Pinecraft Equestrian SMP
如果你在你的服务器上使用了 ModNVote,欢迎给 GitHub 仓库点个 Star,我们将不胜感激。
ModNVote
Privacy-first, GUI-driven community polling for PaperMC 1.21.x
ModNVote is a modern voting and polling plugin for Minecraft communities that want polls to be easy for players, practical for admins, and verifiable after the fact.
ModNVote 2.x replaces the original Yes/No-only workflow with a full poll lifecycle system supporting:
- Ranked single-winner polls
- Yes/No polls
- GUI-driven poll creation and editing
- Poll cloning for repeat or template-based polls
- Anonymous ballot storage
- Participation tracking separated from vote content
- Ballot proof-phrase verification
- Tamper-evident audit and integrity checks
- Optional external witness publication via Discord-compatible webhooks
- Manual and automatic integrity checkpoint publication
- Java/Bedrock-friendly inventory interfaces
- Mandatory vote confirmation before submission
/poll as a short alias for /modnvote
Built for PaperMC 1.21.x and Java 21.
ModNVote is the spiritual successor to PineVote, rebuilt cleanly under the MODN METL brand with a stronger focus on privacy, transparency, and integrity.
Key Features
GUI Poll Builder
Admins can create and edit polls through an inventory GUI rather than a long sequence of setup commands.
Supported builder flows:
/modnvote create ranked_single_winner <optionCount>
/modnvote create yes_no
/modnvote edit <draftPollId>
The shorter alias can also be used:
/poll create ranked_single_winner <optionCount>
/poll create yes_no
/poll edit <draftPollId>
The builder lets admins configure:
- Poll title
- Poll description
- Option names
- Option descriptions
- Ranked poll partial-ranking behaviour
- Ranked poll maximum ranking count
Fields use clear red/green completion indicators:
- Red = still needs work
- Green = complete
When the poll is valid, the READY control turns green and the poll can be staged for opening.
Poll Cloning
Admins can clone an existing poll into a new editable draft:
/modnvote clone <sourcePollId>
This is useful for recurring polls where some options, wording, or settings are reused.
Cloning copies the poll definition and options, but does not copy ballots, participation records, lifecycle timestamps, proof phrases, or audit history.
Ranked Single-Winner Polls
Ranked polls let players order choices by preference.
Admins can create a ranked poll with:
/modnvote create ranked_single_winner 5
Players then vote through a GUI using:
/modnvote vote <pollId>
Ranked voting includes:
- Click-to-rank options
- Stable paper option icons
- Tooltip text showing current rank
- Optional partial-ranking support
- Configurable max rankings
- Mandatory review/confirmation before the ballot is cast
Yes/No Polls
Yes/No polls are still fully supported, now as part of the 2.x poll lifecycle.
Admins can create one with:
/modnvote create yes_no
The plugin uses protected canonical Yes and No options while still supporting the new GUI setup and lifecycle flow.
Anonymous Ballots
ModNVote is built around one core rule:
Anonymous ballots are the source of truth for vote content.
The plugin deliberately separates:
| Data |
Purpose |
| Anonymous ballots |
Store vote content and drive results |
| Participation records |
Track who participated and prevent duplicates |
| Audit records |
Provide lifecycle and integrity evidence |
| Proof phrases |
Let players verify ballots without exposing identity links |
This means results are calculated from anonymous ballots only, not from identity-aware participation records.
Verification Without Revealing Vote Content
Players can verify participation:
/modnvote verify participation <pollId>
This confirms whether their participation was recorded without revealing how they voted.
Players can also verify a ballot proof phrase:
/modnvote verify ballot <pollId> <proofPhrase>
Proof phrases act like bearer tokens. Anyone with the phrase can verify that ballot reference, so players should keep them private.
Audit, Integrity Checks, and Witness Publication
ModNVote is designed to make tampering detectable.
Integrity features include:
- Anonymous ballot hash checks
- Ballot proof commitment checks
- Participation inclusion checks
- Poll lifecycle audit records
- Audit chain validation
- Result calculation from anonymous ballots only
- Optional witness checkpoint publication
ModNVote can publish privacy-safe witness events to configured Discord-compatible webhooks.
Supported witness events include:
- Poll opened
- Poll closed, including a public result summary
- Automatic integrity checkpoints every configured number of accepted ballots
- Manual integrity checkpoints via:
/modnvote checkpoint <pollId>
Witness publication does not publish player names, UUIDs, IP addresses, proof phrases, participation receipts, or per-player vote content.
Webhook delivery is best-effort and non-blocking. A failed webhook does not cancel voting, poll opening, poll closing, checkpointing, or persistence.
Java and Bedrock Friendly GUI
The GUI intentionally avoids decorative glass panes.
This keeps the interface simpler and more compatible with Bedrock players while still providing clear interaction cues through:
- Item names
- Item lore
- Wrapped multiline descriptions
- Red/green builder state
- Confirmation screens
Main Commands
All commands are rooted at:
/modnvote
The shorter alias is also available:
/poll
Admin workflow
/modnvote guide
/modnvote create ranked_single_winner <optionCount>
/modnvote create yes_no
/modnvote edit <draftPollId>
/modnvote clone <sourcePollId>
/modnvote list
/modnvote show <pollId>
/modnvote delete <pollId>
/modnvote open <pollId>
/modnvote close <pollId>
/modnvote result <pollId>
/modnvote checkpoint <pollId>
Player workflow
/modnvote vote <pollId>
/modnvote mypolls
/modnvote verify participation <pollId>
/modnvote verify ballot <pollId> <proofPhrase>
Utility
/modnvote status
/modnvote reload
All examples above can also be run with /poll instead of /modnvote.
Some older low-level setup commands may remain callable as recovery tools, but normal poll setup should use the GUI builder.
Privacy Model
ModNVote avoids storing voter identity and vote content together.
Participation records are identity-aware because the plugin needs to know who has already voted. Anonymous ballots store the vote content. These two systems are deliberately separate.
This allows the plugin to:
- Prevent duplicate voting
- Verify that a player participated
- Calculate results from ballot content
- Avoid exposing how a named player voted
/modnvote verify participation must not reveal vote content.
/modnvote result must use anonymous ballots only.
External witness publication is poll-level only and must not reveal player-specific vote data.
Poll Lifecycle
Polls move through explicit states:
DRAFT -> READY -> OPEN -> CLOSED
Typical flow:
create -> edit in builder -> mark READY -> open -> players vote -> close -> result
DRAFT polls can be edited in the Poll Builder. READY polls can be opened. OPEN polls accept votes. CLOSED polls can report results.
Webhook Configuration
Webhook publication is configured in plugins/ModNVote/config.yml.
A single webhook should be configured as a YAML list:
publication:
discord_webhooks:
- "https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN"
publish_poll_opened: true
publish_poll_closed: true
publish_checkpoints: true
integrity:
checkpoint_interval_ballots: 25
Use discord_webhooks: [] to disable webhook publication.
Multiple webhooks are supported by adding more - ... lines.
Never commit real webhook URLs to source control.
PlaceholderAPI
PlaceholderAPI support was part of the legacy 1.x plugin.
For ModNVote 2.x, please check the current release notes and repository documentation for the latest PlaceholderAPI status before relying on placeholders in production dashboards.
Requirements
- Server: PaperMC 1.21.x
- Java: 21
- Database: SQLite
- Optional: PlaceholderAPI, where supported by the current build
Installation
- Download the latest
modnvote-*.jar.
- Drop it into your server's
plugins folder.
- Restart the server.
- Configure permissions with your permissions plugin.
- Create a test poll with:
/modnvote create yes_no
or:
/modnvote create ranked_single_winner 3
ModNVote 2.x is a clean-install release. Migration from legacy 1.x databases is not currently supported.
Permissions
Permissions are defined in plugin.yml.
Common permissions include:
modnvote.admin.poll.create
modnvote.admin.poll.list
modnvote.admin.poll.open
modnvote.admin.poll.close
modnvote.admin.reload
modnvote.verify
modnvote.testvote
Duplicate-prevention bypass support remains configurable through the plugin configuration.
Roadmap
Potential future 2.x work includes:
- Multi-winner STV
- Combined elections such as Mayor + Council
- Exportable signed audit snapshots
- Advanced reporting and dashboards
- Dedicated GUI delete confirmation flow
- Additional admin transparency tooling
- Multi-target witness publication beyond Discord-compatible webhooks
License & Credits
- License: MIT
- Copyright: MODN METL LTD
- Developed by Jamie E. Thompson (@jamjet3)
- Community testing: Pinecraft Equestrian SMP
If you use ModNVote on your server, a star on the GitHub repo is always appreciated.
评论 0
登录后参与评分
还没有评论,来抢沙发吧