Mod Utils
在 Paper 服务器上为客户端模组提供支持,并阻止不需要的模组。
Mod Utils 让拥有流行客户端模组的玩家能够在普通的 Paper 服务器上获得完整体验,支持 Fabric 或 NeoForge 客户端。它还包含一个模组拦截器,会踢出客户端含有你不允许的模组的玩家。
⚠️ 活跃开发与测试通知
Mod Utils 目前处于活跃开发阶段。
- 进行中: 配置、权限、命令和功能尚未最终确定,可能会发生变化。
- 我们需要你的反馈! 请在你的服务器上测试该插件,并报告任何错误、性能问题或功能请求。
- 版本经验法则: 当客户端和服务器都运行在完全相同的 Minecraft 版本时,所有功能都应完美运行。某些功能目前尚不完全支持跨版本。
⚠️ 已知问题
- JEI: Bukkit 服务器不会向客户端发送配方
平台支持:
版本兼容性
单个 jar 文件可在 Paper 或 Bukkit 1.20.6 至 26.3 上运行。使用 ViaVersion 后,只要双方都在模组支持的范围内,服务器和客户端的版本可以自由混合。
跨版本支持状态
- JEI 和 Polymer 可以协同工作。 如果客户端安装了 Polymer,服务器上的自定义物品会在 JEI 配方中正确显示。
- 客户端未安装 Polymer 时的 JEI: JEI 仍能获取服务器的配方。使用自定义物品的配方会使用替代物品显示(默认为龙蛋,你可以在
config.yml 中更改)。配方功能正常,但自定义原料渲染不正确,会显示为该替代物品。
- 不使用 ViaVersion 时,客户端必须与服务器版本相同。
- 比服务器版本旧的客户端 还需要 ViaBackwards。
模组兼容
以下每个模组都可以在 config.yml 中单独开启或关闭,并且仅对安装了该模组的玩家生效。
| Mod |
服务器提供的功能 |
| Jade🔍 |
熔炉和酿造进度、蜂箱、唱片机、箱子、 barrels 和潜影盒内容、生物生长和繁殖计时器、宠物主人、自定义方块名称 |
| The One Probe |
作物生长、熔炉、酿造台、存储内容、生物生命值、宠物主人 |
| AppleSkin |
饥饿叠加层中的准确饱和度和消耗值 |
| TrashSlot |
垃圾桶中的物品可以被取回,且删除操作在服务端生效 |
| Shulker Box Tooltip |
预览玩家的末影箱内容(潜影盒无需服务端即可正常工作) |
| JEI |
+按钮配方转移,以及发送服务器配方(包括自定义配方) |
| Polymer |
自定义物品在 JEI 配方中正确显示,且操作员在创造模式标签页中能看到它们 |
- 各个功能可以单独关闭,例如
furnace、itemStorage 或 mobHealth。
- 按玩家设置的速率限制可防止服务器遭受请求轰炸。
局限性
- Jade (自定义方块):当查看自定义方块时,提示框可能会闪烁,因为客户端不会为其认为是原版方块的方块请求数据。
- Jade (自定义方块):图标保持原始方块的样子,其数据(如唱片机的音符)也保持原样。
- JEI:向客户端发送消息,告知服务器未安装 JEI
模组拦截
踢出客户端含有你不想要的模组的玩家,并列出所有检测到的内容。
- 通道检测: 通过模组 ID 拦截使用网络通信的模组。
- 翻译键检测: 通过检查客户端是否存在其语言键之一,来查找没有网络通信的纯客户端模组。
- 完全自定义的踢出消息。
- 权限
modutils.modblock.bypass 可跳过检查。
- 默认关闭。
插件挂钩
Mod Utils 会在安装其他插件时挂钩(hook)它们,对于未安装的插件则不做任何操作。
/modutils status 列出当前激活的挂钩,悬停按钮可查看未安装的挂钩。
| Plugin |
What it is used for |
| ViaVersion |
通过翻译其客户端版本对应的物品和组件数据,支持使用其他客户端版本的玩家 |
| ViaBackwards |
与 ViaVersion 配合工作,为使用旧版客户端的玩家反向翻译物品和注册表数据 |
| Geyser / Floodgate |
检测基岩版玩家,所有兼容性逻辑都会跳过这些玩家 |
| CraftEngine (26.5+) |
在 JEI 中正确显示 CraftEngine 配方中的自定义物品,无需额外配置 |
| ItemsAdder (Not Tested) |
根据 ID 查找 ItemsAdder 物品以用于 ingredients 设置 |
| Nexo (Not Tested) |
根据 ID 查找 Nexo 物品以用于 ingredients 设置 |
| Oraxen |
根据 ID 查找 Oraxen 物品以用于 ingredients 设置 |
- ViaVersion: 支持使用其他客户端版本的玩家。会为其版本翻译物品和组件数据。
- Bedrock 玩家(Geyser 或 Floodgate)会被跳过。
- CraftEngine: CraftEngine 使用普通的占位物品构建部分配方,因此 JEI 会显示普通物品。Mod Utils 会调用 CraftEngine 的 API 来查询配方实际需要的自定义物品。
- Other plugins: 如果来自其他插件的配方在 JEI 中显示为普通物品,请在
config.yml 的 modCompat.polymer.ingredients 下添加规则。其 like 设置接受任意已挂钩插件的自定义物品 ID。前缀用于指定从哪个插件查找:craftengine:default:topaz、itemsadder:namespace:id、nexo:ruby、oraxen:ruby。如果没有前缀,则会询问所有已安装的插件(效率较低)。
- Safe fallback: 如果某个插件的 API 版本是 Mod Utils 未知的,该挂钩会自动禁用并记录警告,物品将显示为普通物品。
Commands
| Command |
Does |
/modutils status |
支持的版本、启用的兼容性模块、被屏蔽的模组,以及当前激活的插件挂钩(悬停按钮可查看未安装的挂钩) |
/modutils players [name] |
显示每个玩家的客户端类型、版本以及他们安装的客户端模组 |
/modutils set <setting> <value> |
实时更改设置,将其保存到 config.yml(保留注释),并仅重启该功能 |
/modutils reload |
重新加载配置并重启所有功能 |
/modutils changelog |
查看你当前版本之后的新版本更新内容(也适用于 modutils.update) |
Permissions:
modutils.admin: 使用 /modutils 命令(操作员默认拥有)
modutils.update: 接收新版本通知,并使用 /modutils changelog(操作员默认拥有)
modutils.modblock.bypass: 跳过模组屏蔽检查
Update Checker
检查 Modrinth 上是否有 Mod Utils 的新版本并通知你。
- 当发现新版本时,控制台会收到通知。
- 拥有
modutils.update 权限的玩家(操作员默认拥有)在加入服务器时会收到通知,附带一个可点击的消息链接到新版本页面,旁边还有一个 [Changelog] 按钮。
- 点击按钮(或运行
/modutils changelog)可查看你当前版本之后的更新内容:在 1.21.6 或更高版本的服务器和客户端中以 对话框 形式展示,否则在聊天栏中展示。
- 默认开启。可在
config.yml 中通过设置 updateChecker.enabled: false 关闭。
Notes
- 支持 Paper 及其分支,包括 Folia。
- 服务器端无需安装客户端模组。
- 采用 CC BY-NC-SA 4.0 许可证。请参阅项目中的第三方声明以了解其所交互的模组信息。本插件不包含任何捆绑模组。
Metrics
TODO's
- Test Items Adder (Don't Own)
- Test Nexo (Don't Own)
- Add older version support
- Create API for Jade & TheOneProbe for custom data to display (currently not public or complete)
Mod Utils
Server-side support for client mods on Paper, plus a way to keep unwanted mods out.
Mod Utils lets players with popular client mods get the full experience on a plain Paper server, with support for
clients on Fabric or NeoForge. It also has a mod blocker that kicks players whose client has mods you don't allow.
⚠️ Active Development & Testing Notice
Mod Utils is currently under active development.
- Work in Progress: Configs, permissions, commands, and features are not final and are subject to change.
- I would love your feedback! Please test the plugin on your server and report any bugs, performance issues, or
feature requests.
- Version Rule of Thumb: All features should work flawlessly when both the client and the server are
running on the exact same Minecraft version. Some features do not fully work cross-version yet.
⚠️ Known Issues
- JEI: Bukkit servers doesn't send recipes to clients
Platforms:
Version compatibility
One jar runs on Paper or Bukkit 1.20.6 up to 26.3. With ViaVersion, server and client versions can be mixed
freely, as
long as both are in the supported range for the mod.
Cross-Version Support Status
| Mod |
Server version |
Client version |
| AppleSkin |
1.20.5 or newer |
1.20.5 or newer |
| TrashSlot |
1.20.5 or newer |
1.20.6 or newer |
| Shulker Box Tooltip |
1.20.5 or newer |
1.20.6 or newer |
| Jade🔍 |
1.20.5 or newer |
1.20.5 or newer |
| The One Probe |
1.20.5 or newer |
1.20.5 or newer |
| JEI |
1.21.3 or newer |
1.21.3 or newer |
| Polymer |
1.21.3 or newer |
1.21.3 or newer |
- JEI and Polymer work together. With Polymer on the client, custom items from your server show correctly in JEI
recipes.
- JEI without Polymer on the client: JEI still gets your server's recipes. Recipes that use custom items are
shown
with a stand-in item (a dragon egg by default, and you can change it in
config.yml). The recipe works, but custom
ingredients don't render properly and show as that stand-in item.
- Without ViaVersion, clients must be on the same version as the server.
- Clients older than the server also need ViaBackwards.
Mod Compat
Each mod below can be switched on or off in config.yml, and only does something for players who have that mod
installed.
| Mod |
What the server adds |
| Jade🔍 |
Furnace and brewing progress, beehives, jukeboxes, chest, barrel and shulker contents, mob growth and breeding timers, pet owners, custom block names |
| The One Probe |
Crop growth, furnaces, brewing stands, storage contents, mob health, pet owners |
| AppleSkin |
Accurate saturation and exhaustion in the hunger overlay |
| TrashSlot |
Items in the trash slot can be taken back, and deleting works on the server |
| Shulker Box Tooltip |
The preview of a player's ender chest (shulker boxes work without the server) |
| JEI |
The + button recipe transfer, and sending your server's recipes, custom ones included |
| Polymer |
Custom items show properly in JEI recipes, and operators see them in the creative tab |
- Individual features can be switched off, such as
furnace, itemStorage or mobHealth.
- Per-player rate limits protect the server from request spam.
Limitations
- Jade (custom blocks): the tooltip can flash when looking at a custom block, because the client doesn't request
data for blocks it thinks are vanilla.
- Jade (custom blocks): the icon stays the original block, and so does its data, such as a jukebox's note.
- JEI: Sends client a message that JEI isn't installed on the server
Mod Block
Kicks players whose client has mods you don't want, and lists everything it found.
- Channel detection: blocks mods that use networking, by mod id.
- Translation detection: finds client-only mods that have no networking, by checking whether one of their language
keys exists on the client.
- A fully customisable kick message.
- Permission
modutils.modblock.bypass skips the check.
- Off by default.
Plugin Hooks
Mod Utils hooks into other plugins when they are installed, and does nothing for the ones that aren't.
/modutils status lists the hooks that are active, and a hoverable button shows the ones that aren't installed.
| Plugin |
What it is used for |
| ViaVersion |
Supports players on other client versions by translating item and component data for their version |
| ViaBackwards |
Works alongside ViaVersion to translate item and registry data backwards for players on older client versions |
| Geyser / Floodgate |
Detects Bedrock players, who are skipped by every compat |
| CraftEngine (26.5+) |
Shows the custom items in CraftEngine recipes correctly in JEI, with no config needed |
| ItemsAdder (Not Tested) |
Looks up ItemsAdder items by id for the ingredients setting |
| Nexo (Not Tested) |
Looks up Nexo items by id for the ingredients setting |
| Oraxen |
Looks up Oraxen items by id for the ingredients setting |
- ViaVersion: players on other client versions are supported. Item and component data is translated for their
version.
- Bedrock players (Geyser or Floodgate) are skipped.
- CraftEngine: CraftEngine builds some recipes out of plain stand-in items, so JEI would show a plain item. Mod
Utils asks CraftEngine's API which custom items a recipe really takes.
- Other plugins: if a recipe from another plugin shows a plain item in JEI, add a rule under
modCompat.polymer.ingredients in config.yml. Its like setting takes a custom item id from any hooked plugin. A
plugin prefix picks which one to look from: craftengine:default:topaz, itemsadder:namespace:id, nexo:ruby,
oraxen:ruby. Without a prefix, every installed plugin is asked (Less Efficient).
- Safe fallback: if a plugin's API isn't a version Mod Utils knows, the hook turns itself off and logs a warning,
and items show as plain items.
Commands
| Command |
Does |
/modutils status |
Supported versions, which compats are on, blocked mods, and the plugin hooks that are active (hover the button for those not installed) |
/modutils players [name] |
Each player's client, version and which client mods they have |
/modutils set <setting> <value> |
Changes a setting live, saves it to config.yml (comments stay) and restarts only that feature |
/modutils reload |
Reloads the config and restarts every feature |
/modutils changelog |
What is new in the versions after yours (also for modutils.update) |
Permissions:
modutils.admin: use /modutils (operators by default)
modutils.update: get told about new versions, and use /modutils changelog (operators by default)
modutils.modblock.bypass: skip the Mod Block check
Update Checker
Checks Modrinth for a newer version of Mod Utils and tells you about it.
- The console is told when a newer version is found.
- Players with the permission
modutils.update (operators by default) are told when they join, with a clickable message
that opens the page of the new version, and a [Changelog] button next to it.
- The button (or
/modutils changelog) shows what is new in the versions after yours: in a dialog with 1.21.6 or
newer
servers and clients, in chat otherwise.
- On by default. Turn it off with
updateChecker.enabled: false in config.yml.
Notes
- Supports Paper and its forks, including Folia.
- The server never needs the client mods installed.
- Licensed CC BY-NC-SA 4.0. See the project's third-party notices for the mods it talks to. None are bundled.
Metrics
TODO's
- Test Items Adder (Don't Own)
- Test Nexo (Don't Own)
- Add older version support
- Create API for Jade & TheOneProbe for custom data to display (currently not public or complete)
评论 0
登录后参与评分
还没有评论,来抢沙发吧