注意: 对于 e4mc 5.4.0 及以上版本,此操作并非必需,因为它们已在此版本中实现了白名单功能。
LANLock
几天前,我偶然发现了 LANGuard,
这是一个实现与此模组相同功能的模组,并且我也为此贡献了代码。
由于这是我第一次接触 Java 和 Minecraft 模组开发,
我开始着手为一个新 PR(Pull Request)工作,但很快发现我基本上是在重写整个模组。
于是我想,不如直接开始一个完全独立的模组,采用不同的方法来强制实施白名单。
于是就有了这个 :)
同时也感谢 Ovilli 创建了作为本模组起点的模组。
制作此模组的原因
越来越多的玩家使用 e4mc 等模组,将他们的局域网世界公开给公众。 但破坏者(griefers)也注意到了这一点,而局域网世界没有任何工具来阻止任何人加入,这开始成为一种风险(参见此视频)。 通过此模组,我试图尽可能接近地重现 Minecraft 服务器白名单系统的功能(尽管我完全没有 Java 知识 o.O)。
功能
- 类似服务器端的白名单
- 存储名称和 UUID
- 使用 UUID 检查连接的玩家是否在白名单中
- 使用 Cloth Config 在 Modmenu 中制作的配置屏幕,便于配置
- 异步自动解析添加的玩家名称对应的 UUID
- 可选项:完全禁用白名单
- 可选项:使用名称而非 UUID 进行检查(用于测试)
- 通过客户端命令
/lanlock访问相同的选项
重要提示
从版本 1.3.5 开始,Cloth Config API 不再是硬性依赖项。
因此,如果您希望通过 Modmenu 中的 GUI 配置此模组,您需要自行安装 Modmenu 和 Cloth Config API。
技术细节
与 LANGuard 不同,LANLock 甚至不允许未列入白名单的玩家通过修改连接过程(使用 mixin)加入服务器。 因此,这一点以及 UUID 的使用将此模组与 LANGuard 区分开来, 至少根据我对编程的理解,它应该更安全。
许可证
Note: This is not needed for e4mc 5.4.0+ as they implemented a whitelist there
LANLock
A few days ago, I stumbled across LANGuard,
a mod that achieves the same thing as this one and also contributed to it.
As this was my first ever contact with Java and Minecraft Mod Development,
I started to work on a new PR but soon noticed that I'm basically rewriting the entire mod.
So I thought, it would be better if I just start a fully own mod that uses a different approach to enforce the whitelist.
And here we are :)
Also a thanks to Ovilli for creating their mod that is the start of this one.
Reason for this mod
More and more players are using mods like e4mc to make their LAN worlds publicly available. But griefers have noticed this too and as LAN worlds provide no tooling to prevent anyone from joining, this starts to become a risk (see this video). With this mod I tried to recreate the Minecraft Server whitelist system as closely as possible (with my non-existent Java knowledge o.O).
Features
- a whitelist similar to the server counterpart
- stores name and UUID
- UUID is used to check if connecting player is on the whitelist
- config screen made with Cloth Config in modmenu for easy configuration
- automatically resolves UUID for added player names asynchronously
- option to disable the whitelist entirely
- option to use names instead of UUIDs for checking (for testing)
- same options accessible via the client side command
/lanlock
Important
As of version 1.3.5, Cloth Config API is not a hard dependency anymore.
So if you want to configure the mod via Modmenu in a GUI, you need to install both Modmenu and Cloth Config API by yourself.
Technical
Other than LANGuard, LANLock doesn't even allow non whitelisted players to join the server by modifying the connection process with a mixin. So this and the usage of UUIDs differentiate this mod from LANGuard and at least from my understanding of programming should make it more secure.
License
下载 LANLock
下载 LANLock
下载 LANLock
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LANLock
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LANLock
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LANLock
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LANLock
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LANLock
下载 LANLock
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LANLock
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 支持 26.3
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
评论 0
登录后参与评分
还没有评论,来抢沙发吧