Mod Utils
为 Paper 服务器上的客户端模组提供支持,并阻止不需要的模组接入。
Mod Utils 让拥有流行客户端模组的玩家能够在普通的 Paper 服务器上获得完整体验,支持 Fabric、NeoForge 或 Forge 客户端。它还提供了一个模组拦截器,会踢出客户端含有你不允许的模组的玩家。
⚠️ 活跃开发与测试通知
Mod Utils 目前处于活跃开发阶段。
- 开发中: 配置、权限、命令和功能尚未最终确定,可能会发生变化。
- 我们需要你的反馈! 请在你的服务器上测试该插件,并报告任何错误、性能问题或功能请求。
- 版本经验法则: 当客户端和服务器都运行在完全相同的 Minecraft 版本上时,所有功能应能完美运行。某些功能目前尚未完全支持跨版本。
⚠️ 已知问题
- JEI:Bukkit 服务器不会向客户端发送合成表
⚠️ 局限性
- Jade(自定义方块):当查看自定义方块时,工具提示可能会闪烁,因为客户端不会为其认为是原版方块的方块请求数据。
- Jade(自定义方块):图标保持为原始方块,其数据(如唱片机中的音符)也是如此。
- JEI:客户端会收到一条消息,提示服务器上未安装 JEI
- ViaFabricPlus:使用该模组加入的客户端必须将其版本设置为Auto(或其游戏版本)。如果客户端的游戏版本与 ViaFabricPlus 报告的版本不同,则会被踢出,并收到一条消息要求将其改回 Auto,因为其模组无法读取服务器发送的内容。
服务器平台:
客户端模组加载器:
玩家可以在 Fabric、NeoForge 和 Forge 上使用客户端模组。
版本兼容性
一个 jar 包可在 Paper 或 Bukkit 1.20 至 26.3 上运行。使用 ViaVersion 后,只要都在模组支持的范围内,服务器和客户端版本可以自由混合。
跨版本支持状态
- JEI 和 Polymer 可以协同工作。 在客户端启用 Polymer 后,你服务器上的自定义物品会在 JEI 配方中正确显示。
- 客户端未启用 Polymer 时的 JEI: JEI 仍然会获取你服务器的配方。使用自定义物品的配方将显示为一个占位物品(默认为龙蛋,你可以在
config.yml 中更改它)。配方可以正常工作,但自定义原料渲染不正确,显示为该占位物品。
- 不使用 ViaVersion 时,客户端必须与服务器的版本相同。
- 比服务器版本旧的客户端 还需要 ViaBackwards。
模组兼容性
以下每个模组都可以在 config.yml 中单独开启或关闭,并且仅对安装了该模组的玩家生效。
| 模组 |
服务器添加的功能 |
| AppleSkin |
在饥饿界面中显示准确的饱和度和消耗值 |
| Jade🔍 |
熔炉和酿造进度、蜂箱、唱片机、箱子、桶和潜影盒的内容、生物生长与繁殖计时器、宠物主人、自定义方块名称 |
| JEI |
配方转移的 + 按钮,以及发送服务器的配方(包括自定义配方) |
| Pick Up Notifier |
货币变化的弹窗(该模组自身也处理物品和经验值) |
| Pickup Notifications |
玩家拾取物品或经验球时显示的弹窗(客户端 1.21.5+),以及可选的货币弹窗 |
| Polymer |
自定义物品在 JEI 配方中正确显示,且操作员在创造模式标签页中能看到它们 |
| Shulker Box Tooltip |
预览玩家的末影箱(潜影盒无需服务器端即可工作) |
| The One Probe |
作物生长、熔炉、酿造台、存储内容、生物生命值、宠物主人 |
| TrashSlot |
可以收回垃圾桶槽位中的物品,且删除操作在服务器上有效 |
- 各个功能可以单独关闭,例如
furnace、itemStorage 或 mobHealth。
- 可以通过
recipeBlacklist 将配方排除在 JEI 之外,并通过 itemBlacklist 将自定义物品排除在 Polymer 之外。两者都接受 ID、命名空间或类似 someplugin:* 的模式。
- 基于每个玩家的速率限制可防止服务器遭受请求轰炸。
- 货币弹窗(Pickup Notifications 和 Pick Up Notifier)使用“货币”功能。详见 插件挂钩 > 货币。
Mod Block
踢出客户端装有你不希望存在的模组的玩家,并列出所有检测到的模组。
- 频道检测: 通过模组 ID 阻止使用网络功能的模组。
- 翻译检测: 通过检查其语言键是否在客户端存在,找出无网络功能的纯客户端模组。
- 完全可定制的踢出消息。
- 权限
modutils.modblock.bypass 可跳过此检查。
- 拥有
modutils.modblock.notify 权限的玩家会在聊天中看到有人被踢出的通知,以及原因涉及的模组。
- 默认关闭。
Plugin Hooks
当安装其他插件时,Mod Utils 会与其挂钩;若未安装,则不执行任何操作。
/modutils status 命令会列出当前激活的挂钩,悬停按钮会显示未安装的挂钩。
| 插件 |
用途 |
| CraftEngine (26.5+) |
在 JEI 中正确显示 CraftEngine 配方中的自定义物品,无需额外配置 |
| Geyser / Floodgate |
检测基岩版玩家,这些玩家会被所有兼容模块跳过 |
| ItemsAdder (未经测试,未拥有) |
根据 ID 查找 ItemsAdder 物品以用于 ingredients 设置 |
| Nexo (未经测试,未拥有) |
根据 ID 查找 Nexo 物品以用于 ingredients 设置 |
| Oraxen |
根据 ID 查找 Oraxen 物品以用于 ingredients 设置 |
| ViaBackwards |
与 ViaVersion 配合使用,为旧版客户端玩家逆向翻译物品和注册表数据 |
| ViaVersion |
支持其他客户端版本的玩家,通过为其版本翻译物品和组件数据 |
- ViaVersion: 支持使用其他客户端版本登录的玩家。其物品和组件数据会被翻译为对应客户端的版本。
- Bedrock 玩家(Geyser 或 Floodgate)将被跳过。
- CraftEngine: CraftEngine 会使用普通的替代物品来构建部分配方,因此 JEI 会显示普通物品。Mod Utils 会询问 CraftEngine 的 API,以确定配方实际使用的是哪些自定义物品。
- 其他插件: 如果来自其他插件的配方在 JEI 中显示为普通物品,请在
config.yml 中的 modCompat.polymer.ingredients 下添加一条规则。其 like 设置项接受来自任何已挂钩插件的自定义物品 ID。前缀用于指定从哪个插件查找:craftengine:default:topaz、itemsadder:namespace:id、nexo:ruby、oraxen:ruby。如果没有前缀,则会向所有已安装的插件发起查询(效率较低)。
- 安全回退机制: 如果某个插件的 API 版本是 Mod Utils 未知的,该钩子会自动禁用并记录警告,此时物品将显示为普通物品。
Money(货币)
当玩家金钱发生变化时,告知模组兼容性模块,以便它们可以显示该信息(Pickup Notifications 和 Pick Up Notifier 会以弹窗形式显示)。仅在兼容性模块需要使用此功能时才启用,因此在不需要时不会产生额外检查开销。它仅挂钩那些高效且提供余额变化事件的经济学插件,因此不会进行轮询查询,也不会给大量玩家带来额外性能成本。Vault 没有此类事件,因此不被使用。
支持的经济学插件:
showLoss 也会报告丢失的金钱,gain 和 loss 部分分别设置弹窗:一个 MiniMessage 名称和一个物品(原版物品,或通过 ID 指定的 CraftEngine、ItemsAdder、Nexo 或 Oraxen 物品的自定义模型或模型数据)。可以在 money.economies 中关闭各个经济学插件。
Commands(命令)
| Command |
Does |
/modutils status |
支持的版本、启用的兼容性模块、被阻止的模组以及当前活跃的插件钩子(悬停按钮可查看未安装的项目) |
/modutils players [name] |
每位玩家的客户端类型、版本及其拥有的客户端模组 |
/modutils set <setting...> <value> |
实时更改设置,将其保存到 config.yml(保留注释),并仅重启该功能 |
/modutils reload |
重新加载配置并重启所有功能 |
/modutils changelog |
在你当前版本之后的新版本中新增了什么内容(也适用于 modutils.update) |
/modutils topconfig 或 /topconfig |
在玩家的客户端上打开 The One Probe 的设置(当权限开启且玩家拥有 modutils.compat.top 时可用 |
Permissions(权限):
modutils.admin:使用 /modutils(操作员默认拥有)
modutils.update:接收新版本通知,并使用 /modutils changelog(操作员默认拥有)
modutils.modblock.bypass:跳过模组检测(Mod Block)检查
modutils.modblock.notify:当玩家因被阻止的模组而被踢出时收到通知(操作员也拥有此权限)
modutils.compat.<mod>:使用模组兼容性:appleskin、jade、jei、pickupnotifications、pickupnotifier、polymer、shulkerboxtooltip、top 或 trashslot。modutils.compat.* 代表全部。仅在 modCompat.permissions: true 时使用,该选项默认关闭(所有人自动获得所有兼容性);开启后,除非你授予权限,否则无人拥有这些兼容性。
- 操作员默认拥有
modutils.admin、modutils.update 以及兼容性权限,除非 config.yml 中 operatorsAllowed 设置为 false。显式为玩家设置的权限始终优先决定。
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(未拥有)
- Test Nexo(未拥有)
- Test CMI(未拥有)
- Test EcoBits(未拥有)
- Test UltraEconomy(未拥有)
- 为 Jade 和 TheOneProbe 创建 API,用于显示自定义数据(目前尚未公开或不完整)
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, NeoForge or Forge. 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
⚠️ 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: clients get sent a message that JEI isn't installed on the server
- ViaFabricPlus: clients joining with it must have its version set to Auto (or the version of their game). A client
whose game is on another version than ViaFabricPlus says is kicked, with a message telling them to set it back to Auto,
since their mods could not read what the server sends.
Server platforms:
Client mod loaders:
Players can use the client mods on Fabric, NeoForge and Forge.
Version compatibility
One jar runs on Paper or Bukkit 1.20 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
- 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 |
| AppleSkin |
Accurate saturation and exhaustion in the hunger overlay |
| Jade🔍 |
Furnace and brewing progress, beehives, jukeboxes, chest, barrel and shulker contents, mob growth and breeding timers, pet owners, custom block names |
| JEI |
The + button recipe transfer, and sending your server's recipes, custom ones included |
| Pick Up Notifier |
Popups for changes of money (the mod does items and experience on its own) |
| Pickup Notifications |
Popups when a player picks up items or experience orbs (client 1.21.5+), and optionally money |
| Polymer |
Custom items show properly in JEI recipes, and operators see them in the creative tab |
| Shulker Box Tooltip |
The preview of a player's ender chest (shulker boxes work without the server) |
| The One Probe |
Crop growth, furnaces, brewing stands, storage contents, mob health, pet owners |
| TrashSlot |
Items in the trash slot can be taken back, and deleting works on the server |
- Individual features can be switched off, such as
furnace, itemStorage or mobHealth.
- Recipes can be kept out of JEI with
recipeBlacklist, and custom items out of Polymer with itemBlacklist. Both take
ids, namespaces or patterns like someplugin:*.
- Per-player rate limits protect the server from request spam.
- Money popups (Pickup Notifications and Pick Up Notifier) use the Money feature. It is
under Plugin Hooks > Money.
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.
- Players with
modutils.modblock.notify are told in chat when someone is kicked, and for which mods.
- 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 |
| CraftEngine (26.5+) |
Shows the custom items in CraftEngine recipes correctly in JEI, with no config needed |
| Geyser / Floodgate |
Detects Bedrock players, who are skipped by every compat |
| ItemsAdder (Not Tested, Don't Own) |
Looks up ItemsAdder items by id for the ingredients setting |
| Nexo (Not Tested, Don't Own) |
Looks up Nexo items by id for the ingredients setting |
| Oraxen |
Looks up Oraxen items by id for the ingredients setting |
| ViaBackwards |
Works alongside ViaVersion to translate item and registry data backwards for players on older client versions |
| ViaVersion |
Supports players on other client versions by translating item and component data for their version |
- 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.
Money
Tells the mod compats when a player's money changes, so they can show it (Pickup Notifications and Pick Up Notifier show
it as a popup). It is only enabled when a compat is using it, so there are no extra checks when it isn't needed. It only
hooks economies that are efficient and provide events for balance changes, so nothing is polled and many players cost
nothing extra. Vault has no such event, so it is not used.
The supported economy plugins:
showLoss also reports money lost, and the gain and loss sections set the popup: a MiniMessage name and an item
(vanilla, or an item of CraftEngine, ItemsAdder, Nexo or Oraxen by id) with a custom item model or model data. Each
economy can be switched off in money.economies.
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) |
/modutils topconfig or /topconfig |
Opens The One Probe's settings on the player's client (for players with modutils.compat.top when permissions are on |
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
modutils.modblock.notify: be told when a player is kicked for blocked mods (operators have it too)
modutils.compat.<mod>: use a mod compat: appleskin, jade, jei, pickupnotifications, pickupnotifier,
polymer, shulkerboxtooltip, top or
trashslot. modutils.compat.* is all of them. Only used with modCompat.permissions: true, which is off by
default (everyone gets every compat); then nobody has them until you grant them.
- Operators have
modutils.admin, modutils.update and the compat permissions too, unless operatorsAllowed is
false in config.yml. A permission that is set for a player explicitly always decides.
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)
- Test CMI (Don't Own)
- Test EcoBits (Don't Own)
- Test UltraEconomy (Don't Own)
- Create API for Jade & TheOneProbe for custom data to display (currently not public or complete)
评论 0
登录后参与评分
还没有评论,来抢沙发吧