ScoreKeeper 插件
ScoreKeeper 可在可配置的存储桶中追踪玩家分数。适用于活动积分、竞赛或其他服务器端计分系统,并通过公开 API 与其他插件集成。
命令
玩家可以省略可选的玩家名称以针对自己。控制台和 RCON 必须为 score get/add/subtract/reset 命令提供玩家名称。
/score-get [playerName] - 显示目标玩家在其活跃存储桶中的分数。
/score-add <amount> - 向你在活跃存储桶中的分数添加数值。
/score-add <playerName> <amount> - 向目标玩家的分数添加数值。
/score-subtract <amount> - 从你在活跃存储桶中的分数减去数值。
/score-subtract <playerName> <amount> - 从目标玩家的分数减去数值。
/score-reset [playerName] - 将目标玩家活跃存储桶的分数重置为该存储桶的初始值。
/score-archive - 归档并重置你在活跃存储桶中的分数。
/score-archive <playerName> - 归档并重置目标玩家在其活跃存储桶中的分数。
/score-archive all - 归档并重置所有存储桶中的分数。
/score-archive bucket <bucketId> - 归档并重置单个存储桶中的所有分数。
/score-archive-list - 列出已保存的归档 ID,按最新优先排序。
/score-archive-list <archiveId> - 显示单个归档中保存的分数。
/score-bucket - 显示你的活跃存储桶。
/score-bucket <bucketId> - 切换你的活跃存储桶。
/score-bucket create <id> <singular> <plural> <initialValue> [reporting] - 创建存储桶。报告选项可以是 admin(管理员)、global(全局)、player(仅玩家)或 none(默认)。
/score-bucket <playerName> <bucketId> - 切换指定玩家的活跃存储桶。
/score-bucket all <bucketId> - 更改服务器的默认存储桶,并清除各个存储桶分配。
/score-run start <bucketId> <topN> <reset:true|false> target <score> - 启动一个直到分数达到目标值才结束的竞速/排行运行。
/score-run start <bucketId> <topN> <reset:true|false> duration <time> - 启动有时限的运行。使用正数和 lowercase s、m、h、d 或 w,例如 4h。
/score-run start <bucketId> <topN> <reset:true|false> until-disabled - 启动一个没有自动结束条件的运行。
/score-run stop <bucketId> - 结束当前活跃的排行运行。
权限
scorekeeper.admin 权限(默认:操作员)用于归档命令、存储桶创建/管理以及高分排行运行管理。score get/add/subtract/reset 和 archive-list 命令目前无权限检查;add、subtract 和 reset 可以针对任何在线玩家。
功能
- 创建具有自定义单数/复数标签、初始值和报告策略的分数存储桶。
- 报告功能可通知操作员/管理员、所有在线玩家、仅被计分的玩家,或无人知晓。
- 启动目标分数、限时或直至禁用的排行榜运行,支持可配置的前 N 名排名及可选的分数重置。
- 归档玩家、存储桶或所有存储桶的分数;归档后分数将重置为存储桶的初始值。
- 在插件的数据文件夹中持久化存储桶定义、分配、分数、活跃运行和归档数据。
API
其他插件可以使用 createBucket(id, singular, plural, initialValue, reporting) 创建存储桶,使用感知存储桶的分数方法,并通过 startTargetScoreRun、startTimedScoreRun、startUntilDisabledScoreRun 和 stopHighScoreRun 启动或停止高分排行运行。
兼容性
专为 Paper 构建,并使用 Bukkit 和 Adventure API。
ScoreKeeper Plugin
ScoreKeeper tracks player scores in configurable buckets. Use it for event points, competitions, or other server-side scoring systems, and integrate it with other plugins through the public API.
Commands
Players can omit an optional player name to target themselves. Console and RCON must provide a player name for score get/add/subtract/reset commands.
/score-get [playerName] - Displays the target player's score in their active bucket.
/score-add <amount> - Adds an amount to your score in your active bucket.
/score-add <playerName> <amount> - Adds an amount to the target player's score.
/score-subtract <amount> - Subtracts an amount from your score in your active bucket.
/score-subtract <playerName> <amount> - Subtracts an amount from the target player's score.
/score-reset [playerName] - Resets the target player's active-bucket score to that bucket's initial value.
/score-archive - Archives and resets your score in your active bucket.
/score-archive <playerName> - Archives and resets the target player's score in their active bucket.
/score-archive all - Archives and resets scores in every bucket.
/score-archive bucket <bucketId> - Archives and resets every score in one bucket.
/score-archive-list - Lists saved archive IDs, newest first.
/score-archive-list <archiveId> - Displays the saved scores in one archive.
/score-bucket - Displays your active bucket.
/score-bucket <bucketId> - Switches your active bucket.
/score-bucket create <id> <singular> <plural> <initialValue> [reporting] - Creates a bucket. Reporting can be admin, global, player, or none (default).
/score-bucket <playerName> <bucketId> - Switches a player's active bucket.
/score-bucket all <bucketId> - Changes the server's default bucket and clears individual bucket assignments.
/score-run start <bucketId> <topN> <reset:true|false> target <score> - Starts a run that ends when a score reaches the target.
/score-run start <bucketId> <topN> <reset:true|false> duration <time> - Starts a timed run. Use a positive number and lowercase s, m, h, d, or w, such as 4h.
/score-run start <bucketId> <topN> <reset:true|false> until-disabled - Starts a run with no automatic end.
/score-run stop <bucketId> - Ends an active run.
Permissions
The scorekeeper.admin permission (default: operators) is required for archive commands, bucket creation/administration, and high-score run management. Score get/add/subtract/reset and archive-list commands currently have no permission checks; add, subtract, and reset can target any online player.
Features
- Create score buckets with custom singular/plural labels, initial values, and reporting policies.
- Reporting can notify operators/admins, everyone online, only the scored player, or nobody.
- Start target-score, timed, or until-disabled high-score runs with configurable top-N standings and optional score resets.
- Archive player, bucket, or all-bucket scores; archived scores reset to their bucket's initial value.
- Persist bucket definitions, assignments, scores, active runs, and archives in the plugin's data folder.
API
Other plugins can create buckets with createBucket(id, singular, plural, initialValue, reporting), use bucket-aware score methods, and start or stop high-score runs with startTargetScoreRun, startTimedScoreRun, startUntilDisabledScoreRun, and stopHighScoreRun.
Compatibility
Built for Paper and uses Bukkit and Adventure APIs.
评论 0
登录后参与评分
还没有评论,来抢沙发吧