
KrepAPI 是一款 Fabric 模组,允许多人服务器(通过 Paper/Spigot 插件消息或具有相同协议的 Fabric 服务器)在客户端定义额外的按键绑定,并在获准时响应原始按键输入,同时可选地要求玩家安装此模组。
仅当你游玩的服务器使用它时才需要 KrepAPI。除非你自己运行匹配的服务器端代码,否则它在单人游戏中不会产生任何实际作用。
功能
- 服务器按键绑定 — 服务器发送操作列表(ID、标签、默认 GLFW 键、分类)。它们会显示在一个专用的控制类别下(例如“KrepAPI (本服务器)”)。按下已绑定的键时会通知服务器。
- 握手验证 — 服务器可验证协议版本和模组版本;配置错误或未安装模组的客户端可以被断开连接(依据服务器策略)。
- 原始按键管线(面向开发者) — 配套模组可以注册监听器以早期观察按键,并在设计允许的情况下(例如服务器批准的覆盖机制)阻止原版对该事件的处理。
- Fabric 专用服务器 — 相同的模组 jar 包可以在 Fabric 服务器上加载,以便在没有 Paper 的情况下处理协议。
要求
- Minecraft — 需与 KrepAPI 构建所针对的版本匹配。
- Fabric Loader
- Fabric API
面向服务器管理员与开发者
服务器集成使用一种小型二进制协议(插件频道 / 自定义负载)。参考实现和文档位于项目仓库中(协议布局、Paper 示例插件、客户端 API)。
许可证
请参阅分发的模组元数据和项目许可证。除非 Modrinth “License” 字段中有其他说明,否则保留所有权利。

KrepAPI is a Fabric mod that lets multiplayer servers (via Paper/Spigot plugin messages or a Fabric server with the same protocol) define extra key bindings on your client, react to raw key input when allowed, and optionally require that you have this mod installed.
You only need KrepAPI if the server you play on uses it. It does nothing useful in single-player unless you run matching server-side code yourself.
Features
- Server key bindings — The server sends a list of actions (ids, labels, default GLFW keys, categories). They show up under a dedicated controls category (e.g. “KrepAPI (this server)”). Pressing a bound key notifies the server.
- Handshake — Server can verify protocol version and mod version; misconfigured or missing clients can be disconnected (server policy).
- Raw key pipeline (for developers) — Companion mods can register listeners to observe keys early and optionally block vanilla handling for that event when the design allows (e.g. server-approved overrides).
- Fabric dedicated server — The same mod jar can load on a Fabric server to handle the protocol without Paper.
Requirements
- Minecraft — Match the version your KrepAPI build targets.
- Fabric Loader
- Fabric API
For server owners & developers
Server integration uses a small binary protocol (plugin channels / custom payloads). Reference implementations and docs live in the project repository (protocol layout, Paper sample plugin, client API).
License
See the distributed mod metadata and project license. All rights reserved unless otherwise stated in the Modrinth “License” field.
评论 0
登录后参与评分
还没有评论,来抢沙发吧