一个简单的模组,确保你的玩家只拥有他们应该拥有的模组。
更新 0.2.0 - 不再需要 ModCheckUtil
已添加一些命令,使生成模组列表变得简单得多。
/modcheck_off - 暂时禁用模组检查,以便你可以使用所需的客户端模组包加入服务器
/modcheck_upload - 将客户端模组包列表上传到服务器并存储它
如果你愿意,仍然可以使用 ModCheckUtil 来生成模组列表。
工作原理
客户端通过遍历 mods 文件夹,为每个文件生成校验和,并在连接时将其全部发送到服务器。
服务器随后会将其模组列表与自身的 modlist.txt 文件进行比对,然后允许玩家加入。
modlist.txt 由 ModCheckUtil 生成。
使用方法
- 将 ModCheckUtil jar 放入你的客户端 mods 文件夹(此时 ModCheck 模组应已包含在该文件夹中)
- 运行
java -jar [ModCheckUtil-version].jar
- modlist.txt 文件应该会出现在同一文件夹中
- 将 modlist.txt 文件复制到服务器的根目录(与 server.properties 等文件并列)
- 一切就绪,启动服务器后一切应该都能正常工作
目前还没有配置文件和其他花哨的功能,而且我也不打算开发其他版本,因为我不需要。
如果你想要不同的版本,可以在项目的 GitHub 上留言或提交 Issue。对于任何想法或错误报告也是如此。
A simple mod that makes sure your players have only the mods they're supposed to have.
Update 0.2.0 - No More ModCheckUtil
Commands have been added that should make generating the modlist much simpler.
/modcheck_off - temporarily disables modcheck so you can join with the desired client pack
/modcheck_upload - uploads the client pack list to the server and stores it
You can still use ModCheckUtil to generate the modlist if you want.
How it works
The client-side works by going through the mods folder, generating a checksum of each file and sending it all to the server when it connects.
The server then checks the modlist against it's modlist.txt file and let's player connect.
The modlist.txt is generated by ModCheckUtil.
How to use
- put ModCheckUtil jar into your client mods folder (ModCheck mod should be included in the folder at this point)
- run
java -jar [ModCheckUtil-version].jar
- modlist.txt file should appear in the same folder
- copy the modlist.txt file into the root of your server (next to files like server.properties
- all is done, if you start your server everything should work
At this point there's no config files and other fancy stuff, and I don't plan to build other versions as I don't need it.
If you want a different version, you can comment or make an Issue on the projects GitHub. Same with any ideas or errors you get.
评论 0
登录后参与评分
还没有评论,来抢沙发吧