TimeoutFix
一款适用于 1.21.7 的简单 Fabric 模组,允许你覆盖默认的服务器端登录超时时间,从而防止网络较差(或整合包较大)的玩家在下载资源完成前被断开连接。
使用方法
- 将模组
.jar 文件放入服务器的 mods 文件夹中。
- 启动并停止服务器。(以便创建默认配置文件)/ 或者在重启前手动创建
- 编辑配置文件 (
config/TimeOutFixConfig.properties),以 服务器刻 (server ticks) 为单位设置你想要的超时时间。
示例:login_time_out=1800 默认值为 600(即 30 秒)
- 启动 / 重启服务器。
贡献
我接受 拉取请求 (pull requests) 和 代码改进。
如果你比我更懂 Java(这很有可能),请随意清理或优化代码 / 或优化构建系统,这些东西在 Java 里真糟糕,我也不知道该怎么用。
免责声明
- 仅在 Fabric 1.21.7 服务器上测试过。
制作原因
我在大约 1–2 小时内完成了这个模组,尽管我在此之前从未写过一行 Java 代码。
所以是的,代码可能写得不太好。
但嘿,它能用。
创建这个模组是因为我有一个朋友网络极差。
我们的服务器有很多模组(比如 Emotecraft,带有服务器端表情动作),这意味着加入游戏可能需要一段时间。如果没有这个模组,下载速度慢的玩家甚至还没加入就会被踢出,提示“已超时”。这个模组通过让服务器等待更长时间来解决这个问题。
TimeoutFix
A simple Minecraft Fabric mod for 1.21.7 that allows you to overwrite the default server-side login timeout time, so players with slow internet connections (or heavy modpacks) don’t get disconnected before they finish downloading resources.
Usage
- Drop the mod
.jar into your server’s mods folder.
- Start and stop the server. (so default config file is created) / or create manually before restart
- Edit the config file (
config/TimeOutFixConfig.properties) to set your preferred timeout in server ticks.
Example: login_time_out=1800 Default value is 600 (30 seconds)
- Start / Restart the server.
Contributions
I accept pull requests and code improvements.
If you know Java better than me (which is likely), feel free to clean up or optimize the code / or optimize build system, this stuff is sucks in java idk how to use it.
Disclaimer
- Tested only on Fabric 1.21.7 server.
Why I made this
I made this in about 1–2 hours, despite never having written Java before in my life.
So yes the code might be badly written.
But hey, it works.
This was created because I have a friend with terrible internet.
Our server has a lot of mods (like Emotecraft with server-side emotes), which means joining can take a while. Without this mod, players with slow downloads would get kicked for "Timed Out" before they even joined. This fixes that by letting the server wait longer.
评论 0
登录后参与评分
还没有评论,来抢沙发吧