mReputation
透明、可审计的玩家声望系统,包含声望等级、历史记录以及与 Paper、Purpur 和 Folia 的集成。
功能特性
- 可配置的初始分数以及硬性最低/最高界限。
- 五个开箱即用的声望等级,支持自定义 MiniMessage 名称,并在进入特定等级时可选触发命令。
- 支持查询自身或他人的分数、查看最高分和最低分排行榜、等级列表以及分页的历史审计记录。
- 对添加、移除、设置和重置操作进行审计,记录执行者、原因、时间戳、变动值及结果值。
- 可选的玩家背书(endorsement)功能,包含证据提交、账号年龄/游戏时长门槛、冷却时间、每日限额以及互投屏蔽机制。
- 超过阈值后配置正向增益衰减,匹配类似社会信用体系的审核工作流。
- 原子化的本地 YAML 存储,合并写入 bursts,保留最后一次备份,并能从损坏的主文件中恢复。
- 可选的最小分数控制台动作,默认禁用,仅在真实跨越阈值时执行。
- 默认提供英文消息,并附带
ru_RU 本地化文件。
- 支持 PlaceholderAPI 占位符、Bukkit Services API 以及可取消的状态变更事件。
- 支持 Paper、Purpur 和 Folia 的任务调度,并提供非侵入式的 Modrinth 更新检查。
要求
- Java 25
- Paper、Purpur 或 Folia 26.3
- PlaceholderAPI 2.12.3 或更高版本(可选)
快速开始
- 将
mReputation-1.2.0.jar 放入 plugins/ 目录并启动服务器。
- 查看
plugins/mReputation/config.yml;生成的默认配置可直接安全使用。
- 赋予管理员权限
mreputation.command.modify 和 mreputation.command.history.other。
- 使用
/rep show、/rep tiers 和 /rep top 来检查系统状态。
默认分数为 500。高于 500 分的正向增益会被缩减为每次操作仅增加 1 点,因此高分代表多次记录的贡献,而非单次大幅度的命令操作。
命令
| 命令 |
用途 |
权限 |
/rep show [player] |
显示分数和等级 |
mreputation.command.show[.other] |
/rep top [page] |
最高记录分数 |
mreputation.command.leaderboard |
/rep bottom [page] |
最低记录分数 |
mreputation.command.leaderboard |
/rep tiers |
列出已配置的等级 |
mreputation.command.tiers |
/rep history [player] [page] |
显示最新的审计条目 |
mreputation.command.history.self / .other |
/rep add <player> <points> <reason> |
增加声望 |
mreputation.command.modify |
/rep remove <player> <points> <reason> |
减少声望 |
mreputation.command.modify |
/rep set <player> <value> <reason> |
设置为有界值 |
mreputation.command.modify |
/rep reset <player> <reason> |
恢复为配置的默认值 |
mreputation.command.modify |
/rep reload |
验证并重载配置/消息 |
mreputation.command.reload |
/reputation、/rep 和 /sc 是等效的。UUID 可用于离线玩家。名称解析仅针对在线玩家或 Paper 的本地缓存,因此命令不会因远程个人资料查找而阻塞。
配置与安全
配置值在启动和重载时会进行检查。无效的语言、限制、页面大小、ID 以及危险的自动命令会回退到安全值。修改理由由管理员填写且上限为 160 个字符;名称、执行者和持久化的历史记录均受边界限制,并移除了控制字符。
等级 enter-commands 支持 {player}、{uuid} 和 {value} 占位符。它们仅在进入不同等级时运行,默认情况下为空。zero-action.enabled 也默认为 false。在启用自动动作之前,请测试所有已配置的命令。
现有的 data.yml 安装将继续正常工作。保存时使用 data.yml.tmp,随后在支持的平台上进行原子替换,并保留 data.yml.bak。快速变更会合并到最新的全量快照中,而不是创建无限制的磁盘写入队列。
玩家投票是一个集成 API,而非公开的 mReputation 命令。它默认处于禁用状态。若要配合 mProfile 使用,请在审查了游戏时长、账号年龄、证据、冷却时间、每日限额和互投投票设置后,启用 player-voting.enabled。负面投票需要单独开启 player-voting.allow-negative 开关。投票状态和分数历史记录保存在同一个原子快照中。
PlaceholderAPI
%mreputation_value% — 数值分数
%mreputation_tier% 或 %mreputation_tier_id% — 稳定的等级 ID
%mreputation_tier_display% — 纯文本等级显示名称
API
从 Bukkit 的 Services Manager 获取 ReputationAPI。它提供分数/等级读取、不可变历史记录、有界排行榜、变更事件、设置、重置、投票能力检查以及受保护的投票。ReputationChangeEvent 可取消。修改操作会触发 Bukkit 事件,应在适合 Paper 或 Folia 的服务器拥有执行上下文中调用。
遥测与更新
mReputation 向 bStats 项目 33360 发送匿名服务器指标数据。绝不会收集分数、UUID、名称、历史记录和原因。设置 metrics.enabled: false 可选择退出。
更新检查仅报告较新的兼容 Modrinth 版本。它不会下载或安装任何文件,可通过设置 updates.enabled: false 禁用。
构建
./gradlew clean build
可分发的文件为 build/libs/mReputation-1.2.0.jar。
报告问题 · 查看源码 · 加入 Discord
依据 MIT 许可证授权。
mReputation
Transparent, auditable player reputation with tiers, history, and integrations for Paper, Purpur, and Folia.
Features
- Configurable starting score and hard minimum/maximum bounds.
- Five ready-to-use reputation tiers with custom MiniMessage names and optional commands when entering a tier.
- Self/other score lookup, highest and lowest leaderboards, tier list and paginated audit history.
- Audited add, remove, set and reset operations with actor, reason, timestamp, delta and resulting value.
- Optional player endorsements with evidence, account-age/playtime gates, cooldowns, daily limits, and reciprocal-vote blocking.
- Configurable positive-gain reduction above a threshold, matching social-credit-style moderation workflows.
- Atomic local YAML storage, coalesced write bursts, a last-known backup and recovery from an invalid primary file.
- Optional minimum-score console action, disabled by default and executed only on a real threshold crossing.
- English messages by default with bundled
ru_RU localization.
- PlaceholderAPI placeholders, Bukkit Services API and cancellable change events.
- Paper, Purpur and Folia scheduling support plus a non-invasive Modrinth update check.
Requirements
- Java 25
- Paper, Purpur or Folia 26.3
- PlaceholderAPI 2.12.3 or newer is optional
Quick start
- Put
mReputation-1.2.0.jar in plugins/ and start the server.
- Review
plugins/mReputation/config.yml; the generated defaults are safe to use immediately.
- Give moderators
mreputation.command.modify and mreputation.command.history.other.
- Use
/rep show, /rep tiers, and /rep top to inspect the system.
The default score is 500. Positive grants above 500 are reduced to one point per action, so a high score represents multiple recorded contributions instead of one oversized command.
Commands
| Command |
Purpose |
Permission |
/rep show [player] |
Show score and tier |
mreputation.command.show[.other] |
/rep top [page] |
Highest recorded scores |
mreputation.command.leaderboard |
/rep bottom [page] |
Lowest recorded scores |
mreputation.command.leaderboard |
/rep tiers |
List configured tiers |
mreputation.command.tiers |
/rep history [player] [page] |
Show newest audit entries first |
mreputation.command.history.self / .other |
/rep add <player> <points> <reason> |
Add reputation |
mreputation.command.modify |
/rep remove <player> <points> <reason> |
Remove reputation |
mreputation.command.modify |
/rep set <player> <value> <reason> |
Set a bounded value |
mreputation.command.modify |
/rep reset <player> <reason> |
Restore the configured default |
mreputation.command.modify |
/rep reload |
Validate and reload configuration/messages |
mreputation.command.reload |
/reputation, /rep, and /sc are equivalent. UUIDs can be used for offline players. Names resolve only from online players or Paper's local cache, so commands never block on a remote profile lookup.
Configuration and safety
Configuration values are checked on startup and reload. Invalid languages, limits, page sizes, IDs and dangerous automatic commands fall back to safe values. Reasons are required for moderator changes and capped at 160 characters; names, actors and persisted history are bounded and control characters are removed.
Tier enter-commands support {player}, {uuid}, and {value}. They run only when entering a different tier and are empty by default. zero-action.enabled is also false by default. Test all configured commands before enabling automatic actions.
Existing data.yml installations continue working. Saves use data.yml.tmp followed by an atomic replacement where supported, and keep data.yml.bak. Rapid changes collapse into the newest full snapshot instead of creating an unbounded disk-write queue.
Player voting is an integration API rather than a public mReputation command. It is disabled by default. To use it from mProfile, enable player-voting.enabled after reviewing the playtime, account-age, evidence, cooldown, daily-limit, and reciprocal-vote settings. Negative votes require the separate player-voting.allow-negative switch. Vote state and score history are saved in the same atomic snapshot.
PlaceholderAPI
%mreputation_value% — numeric score
%mreputation_tier% or %mreputation_tier_id% — stable tier ID
%mreputation_tier_display% — plain-text tier display name
API
Obtain ReputationAPI from Bukkit's Services Manager. It provides score/tier reads, immutable history, bounded leaderboards, changes, sets, resets, voting capability checks, and protected votes. ReputationChangeEvent is cancellable. Mutation calls fire a Bukkit event and should be made from a server-owned execution context appropriate for Paper or Folia.
Telemetry and updates
mReputation sends anonymous server metrics to bStats project 33360. Scores, UUIDs, names, history and reasons are never collected. Set metrics.enabled: false to opt out.
The update check only reports a newer compatible Modrinth version. It never downloads or installs files and can be disabled with updates.enabled: false.
Build
./gradlew clean build
The distributable file is build/libs/mReputation-1.2.0.jar.
Report an issue · View source · Join Discord
Licensed under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧