概述
感谢您选择我们的模组白名单(Mod Whitelist)模组,以保护您的服务器免受客户端作弊模组的侵害。下面我将介绍它的工作原理以及您可以进行的操作。
本模组在客户端和服务器上分别运行:
- 在客户端侧,它会收集所有模组的标识符(“mod_id”),对其进行加密并发送至服务器。
- 在服务端侧,它会检查尝试连接服务器的玩家是否安装了作弊模组,或者是否未安装必要的模组以避免出现问题。
但两端都必须启用。如果未满足此条件:
- 仅安装在客户端,未安装在服务端。客户端玩家仍可进入服务器进行游戏,但该模组无法保护你的服务器免受黑客攻击。
- 仅安装在服务端,未安装在客户端。不允许客户端玩家进入服务器,并会收到消息 “multiplayer.disconnect.mod_whitelist.packet_corruption”。
将模组加入白名单和黑名单
配置文件位于 <server directory>/config/mod_whitelist-config.json。若要向白名单或黑名单中添加模组,请阅读以下指南。
首先,你需要找到模组的标识符(modid)。一个简单的方法是使用归档软件(例如 WinZip、好压、7-Zip)打开 jar 文件,进入 fabric.mod.json 并查看键 "id" 的值。例如,Mod Whitelist 模组的 modid 为 "mod_whitelist"。
然后,如果你希望客户端玩家安装该模组,请将其添加到 CLIENT_MOD_NECESSARY 字段中。默认情况下为黑名单模式,因此如果你不希望客户端玩家安装该模组,可以将其添加到 CLIENT_MOD_BLACKLIST 字段中。如果你想改用白名单模式,请将 USE_WHITELIST_ONLY 设置为 true,并将所有白名单模组的 modid 添加到 CLIENT_MOD_WHITELIST 字段中。
此外,如果 USE_WHITELIST_ONLY 为 true,则在服务器运行时将忽略 CLIENT_MOD_BLACKLIST 字段。而如果 USE_WHITELIST_ONLY 为 true,则将忽略 CLIENT_MOD_WHITELIST 字段。
如你所见,如果安装了 fabric-api,模组列表中将包含大量的 modid。你可以使用安装了此模组的客户端运行游戏,并打开 .minecraft/logs/latest.log,你将看到如下格式的行,以简化手动收集模组列表的过程:
来自客户端的 Mod Whitelist vx.x.x!模组列表: ["fabric-api", "fabric-api-base", ...]
问题追踪器
如果发现此模组存在任何问题,请访问 并提交你的问题与日志。
Abstract
Thank you for choosing our Mod Whitelist mod to protect your server from client hacking mods. Let me introduce how it works and what you can do.
This mod works on client and server separately:
- On the client side, it gathers all identifier of mods ("mod_id"s), encrypted them and send to the server.
- On the server side, it checks players who try to connect the server if they install hacking mods, or if they do not install any necessary mods to avoid problems.
But both sides are required. If not:
- Installed on the client side but not installed on the server side. The client player can still enter the server and play, but this mod can not protect your server from hacking.
- Installed on the server side but not installed on the client side. The client player is not allowed to enter the server and sent message "multiplayer.disconnect.mod_whitelist.packet_corruption".
Adding a mod to whitelist and blacklist
The config file is in "<server directory>/config/mod_whitelist-config.json". If you want to add mods to the whitelist or blacklist, please read the following guides.
First, you should find the identifier of the mod (modid), a simple way is open the jar file with an archiver software (eg. WinZip, HaoZip, 7-Zip), open "fabric.mod.json" and see what the value of key "id" is. For example, the modid of Mod Whitelist mod is "mod_whitelist".
Then, add it to CLIENT_MOD_NECESSARY field if you want client players install it. By default, it is blacklist mode, so you can add it to CLIENT_MOD_BLACKLIST field if you do not want client players install it. If you want to use whitelist mode instead, set USE_WHITELIST_ONLY to true and add all whitelist modids to CLIENT_MOD_WHITELIST field.
In addition, if USE_WHITELIST_ONLY is true, CLIENT_MOD_BLACKLIST field is just ignored while running the server. And if USE_WHITELIST_ONLY is true, CLIENT_MOD_WHITELIST field is ignored instead.
As you might see, if fabric-api is installed, the modlist will contains quite a lot of modids. You can run a client with this mod installed, and open ".minecraft/logs/latest.log", and you will see the following format line to simplify gathering the modlist manually:
Mod Whitelist vx.x.x from the client! Modlist: ["fabric-api", "fabric-api-base", ...]
Issue tracker
Visit and post your issue and logs if you find any problems with this mod.
评论 0
登录后参与评分
还没有评论,来抢沙发吧