Mortik Library 是一款面向运行 Paper 1.21.11 的服务器的可配置事件记录插件。它帮助服务器工作人员回顾玩家活动、调查死亡与 PvP 遭遇,并通过可搜索的游戏内历史记录检查近期的服务器性能。
事件记录
Mortik Library 支持 64 种事件类型,同时记录插件启动、关闭以及低 TPS(每秒刻数)情况。
可用的类别包括:
- 玩家活动: 加入、断开连接、重生、传送、世界变更、进度达成、游戏模式更改等。
- 战斗: 玩家死亡、击杀者归属、PvP 伤害、复活以及药水效果变化。
- 方块: 放置、破坏、点燃、燃烧、爆炸和施肥。
- 容器与物品: 打开/关闭物品栏、物品掉落、拾取、合成、附魔以及熔炉提取。
- 世界事件: 天气变化、闪电、爆炸、传送门以及世界加载或保存。
- 实体: 生成、死亡、驯服、繁殖、形态变换以及载具相关事件。
- 服务器活动: 插件启用与禁用事件、服务器加载以及低 TPS 记录。
- 可选的聊天与命令日志: 命令日志仅存储命令名称而不包含其参数。
记录可按类别进行配置,也可针对单个事件类型进行覆盖。高频率类别(如方块、物品栏活动和实体事件)默认处于禁用状态。
可搜索的历史记录
按事件类型、玩家名称、UUID 和时间窗口搜索记录的事件。结果采用分页显示,并附带 UTC 时间戳。
死亡记录包括受害者、击杀者名称及 UUID(如有)、最后一次伤害来源、死亡消息以及位置。击杀者归属遵循 Bukkit 的玩家击杀追踪机制。
历史记录以异步方式保存至每日日志文件。默认配置保留七天的日志,并保留最近 20,000 条记录供游戏内搜索使用。CSV 导出基于此可搜索的历史记录。
近期服务器性能
检查过去十分钟内收集的性能样本,包括:
- 平均采样 TPS 与最小采样 TPS。
- 最大采样 MSPT(每刻毫秒数)。
- 逐分钟摘要。
- 在线玩家数量。
- 低 TPS 事件记录。
TPS 值使用 Paper 的一分钟滚动估算值。性能样本在启动后开始累积,并在插件重启时重置。此功能提供近期的性能背景信息;它不用于识别卡顿的原因。
命令
主命令为 /mortik,/ml 和 /mortiklibrary 为其别名。Tab 补全建议命令、事件类型、已知玩家、语言以及常见参数值。
| 命令 |
描述 |
/mortik help |
显示命令帮助。 |
/mortik events [type] [player] [minutes] [page] |
搜索记录的事件。 |
/mortik deaths <player> [minutes] [page] |
回顾玩家死亡记录。 |
/mortik kills <killer> [minutes] [page] |
回顾玩家击杀记录。 |
/mortik player <player> [minutes] [page] |
回顾某玩家的记录活动。 |
/mortik tps [1–10] |
检查近期性能样本。 |
/mortik status |
查看记录器状态及存储队列统计信息。 |
/mortik types |
列出已注册的事件类型及其启用状态。 |
/mortik info |
解释记录工作原理。 |
/mortik language <en|cs|es|it|fr> |
设置首选语言。 |
/mortik reload |
重新加载配置和消息。 |
/mortik export [type] [player] [minutes] |
将匹配的记录导出为 CSV。 |
使用 * 可匹配所有事件类型或玩家。事件搜索默认时间窗口为 60 分钟。
语言与配置
默认语言为英语。内置捷克语、西班牙语、意大利语和法语翻译。
玩家可以选择自己的语言,该偏好设置在重启后会保留。消息模板、命令帮助以及消息前缀可在语言文件中编辑。技术性的事件标识符和记录的事件数据保持为英文。
配置选项包括记录类别、单个事件覆盖、历史记录限制、日志保留期限、采样间隔以及低 TPS 阈值。
权限
| 权限 |
访问范围 |
mortik.view |
历史、性能和信息相关命令。 |
mortik.admin |
配置重载和 CSV 导出。 |
mortik.language |
个人语言选择。 |
历史和管理权限默认赋予服务器操作员。语言选择功能默认对所有玩家开放。
开发者 API
Mortik Library 提供不可变的历史快照、近期性能样本、自定义记录创建,以及用于与其他插件集成的同步 MortikRecordEvent 通知。
安装
- 使用运行 Java 21 的 Paper 1.21.11 服务器。
- 将插件 JAR 文件放入服务器的
plugins 目录。
- 启动服务器以生成配置文件和语言文件。
- 调整记录设置并运行
/mortik reload。
- 使用
/mortik help 开始使用。
范围与限制
Mortik Library 是一个活动记录器,而非回滚系统或完整的物品交易审计工具。容器事件仅记录打开和关闭操作,而非每一次物品转移。
搜索结果仅限于保留在内存中的记录缓冲区。队列过载、磁盘写入失败或配置的每日文件限制可能导致记录无法持久化;可通过 /mortik status 查看未保存的记录计数器。
专为 Paper 1.21.11(Purpur)设计。不支持 Folia、Fabric 和 Forge。当前版本已通过编译和自动化检查;在真实服务器上的玩家测试仍在进行中。
Mortik Library is a configurable event recorder for servers running Paper 1.21.11. It helps server staff review player activity, investigate deaths and PvP encounters, and inspect recent server performance through searchable in-game history.
Event recording
Mortik Library supports 64 event types, alongside records for plugin startup, shutdown, and low TPS.
Available categories include:
- Player activity: joins, disconnects, respawns, teleports, world changes, advancements, game mode changes, and more.
- Combat: player deaths, killer attribution, PvP damage, resurrection, and potion effect changes.
- Blocks: placement, breaking, ignition, burning, explosions, and fertilization.
- Containers and items: inventory opening and closing, item drops, pickups, crafting, enchanting, and furnace extraction.
- World events: weather changes, lightning, explosions, portals, and world loading or saving.
- Entities: spawning, deaths, taming, breeding, transformations, and vehicle events.
- Server activity: plugin enable and disable events, server loading, and low-TPS records.
- Optional chat and command logging: command logging stores command names without their arguments.
Recording can be configured by category or overridden for individual event types. High-volume categories such as blocks, inventory activity, and entity events are disabled by default.
Searchable history
Search recorded events by type, player name, UUID, and time window. Results are paginated and displayed with UTC timestamps.
Death records include the victim, killer name and UUID when available, last damage cause, death message, and location. Killer attribution follows Bukkit’s player-killer tracking.
History is saved asynchronously to daily log files. The default configuration retains seven days of logs and keeps the latest 20,000 records available for in-game searches. CSV exports use this searchable history.
Recent server performance
Inspect performance samples collected over the last ten minutes, including:
- Average and minimum sampled TPS.
- Maximum sampled MSPT.
- Minute-by-minute summaries.
- Online player counts.
- Low-TPS event records.
TPS values use Paper’s one-minute rolling estimate. Performance samples begin accumulating after startup and reset when the plugin restarts. This feature provides recent performance context; it does not identify the cause of lag.
Commands
The main command is /mortik, with /ml and /mortiklibrary as aliases. Tab completion suggests commands, event types, known players, languages, and common argument values.
| Command |
Description |
/mortik help |
Display command help. |
/mortik events [type] [player] [minutes] [page] |
Search recorded events. |
/mortik deaths <player> [minutes] [page] |
Review player deaths. |
/mortik kills <killer> [minutes] [page] |
Review player kills. |
/mortik player <player> [minutes] [page] |
Review a player’s recorded activity. |
/mortik tps [1–10] |
Inspect recent performance samples. |
/mortik status |
Check recorder status and storage queue statistics. |
/mortik types |
List registered event types and their enabled state. |
/mortik info |
Explain how recording works. |
/mortik language <en|cs|es|it|fr> |
Set your preferred language. |
/mortik reload |
Reload configuration and messages. |
/mortik export [type] [player] [minutes] |
Export matching records to CSV. |
Use * to match all event types or players. Event searches default to a 60-minute window.
Languages and configuration
English is the default language. Czech, Spanish, Italian, and French translations are included.
Players can select their own language, and their preference is saved across restarts. Message templates, command help, and the message prefix can be edited in the language files. Technical event identifiers and recorded event data remain in English.
Configuration options include recording categories, individual event overrides, history limits, log retention, sampling intervals, and the low-TPS threshold.
Permissions
| Permission |
Access |
mortik.view |
History, performance, and information commands. |
mortik.admin |
Configuration reload and CSV export. |
mortik.language |
Personal language selection. |
History and administration permissions default to server operators. Language selection is available to players by default.
Developer API
Mortik Library provides immutable history snapshots, recent performance samples, custom record creation, and a synchronous MortikRecordEvent notification for integrations with other plugins.
Installation
- Use a Paper 1.21.11 server running Java 21.
- Place the plugin JAR in the server’s
plugins directory.
- Start the server to generate configuration and language files.
- Adjust recording settings and run
/mortik reload.
- Use
/mortik help to get started.
Scope and limitations
Mortik Library is an activity recorder, not a rollback system or a complete inventory transaction audit. Container events record opening and closing, not every item transfer.
Search results are limited to the retained in-memory record buffer. Queue overload, disk write failures, or the configured daily file limit can prevent records from being persisted; /mortik status exposes the unsaved record counter.
Designed for Paper 1.21.11 (Purpur). Folia, Fabric, and Forge are not supported. The current build has passed compilation and automated checks; live-server testing with players is still pending.
评论 0
登录后参与评分
还没有评论,来抢沙发吧