English | 简体中文
Offline Pass is a minimal server-side Forge 1.20.1 mod that allows selected offline clients to join a server while online-mode=true remains enabled.
It is intended for private or trusted servers that want to keep premium authentication for real premium usernames while still allowing non-premium usernames to join.
online-mode=true.Offline Pass does not authenticate offline players.
It does not provide account registration, password login, identity ownership proof, anti-impersonation protection, database integration, permission integration, or EasyAuth-style account protection.
Anyone who can connect with an allowed offline username can use that offline identity. By default, Offline Pass avoids letting offline players use premium usernames. If you add a premium username to the forced-offline list, you are explicitly allowing offline players to use that name. Use this mod only when you understand that risk, preferably on private or trusted servers.
config/offlinepass/forced-offline-names.txt or use the command below. That name will then always use offline identity.Offline Pass returns accepted offline players to Forge's normal login negotiation, so mod channel handshakes still run.
mods/ folder.online-mode=true in server.properties.This mod is server-side only. Clients do not need to install it.
Files:
config/offlinepass/premium-cache.tsv
config/offlinepass/forced-offline-names.txt
premium-cache.tsv stores username status results. forced-offline-names.txt stores usernames that should always use offline identity.
Requires permission level 3:
/offlinepass forcedoffline add <name>
/offlinepass forcedoffline remove <name>
/offlinepass forcedoffline list
/offlinepass forcedoffline reload
add and remove update both memory and forced-offline-names.txt immediately. reload is only needed if you manually edit the file while the server is running.
./gradlew build
The jar is written to:
build/libs/offlinepass-0.1.0.jar
MIT License.
Implementation assistance by Codex.
English | 简体中文
Offline Pass 是一个极简 Forge 1.20.1 服务端 mod,用于在服务器保持 online-mode=true 的情况下,允许部分离线客户端进入服务器。
它适合私人服务器或可信服务器:正版用户名继续走正版验证,非正版用户名走离线身份。
online-mode=true。Offline Pass 不会对离线玩家做鉴权。
它不提供账号注册、密码登录、身份所有权证明、顶号防护、数据库集成、权限集成,也不是 EasyAuth 账号系统的替代品。
任何能使用某个允许的离线用户名连接服务器的人,都可以使用该离线身份。默认情况下,Offline Pass 会避免离线玩家使用正版用户名。如果你把某个正版用户名加入强制离线名单,就等于明确允许离线玩家使用这个名字。请只在理解这些风险的情况下使用,最好用于私人或可信服务器。
online-mode=true 正版验证。config/offlinepass/forced-offline-names.txt,或使用下面的命令添加。加入后该用户名总是走离线身份。离线玩家被放行后仍会回到 Forge 正常登录协商流程,因此 mod channel 握手仍会执行。
mods/ 文件夹。server.properties 中的 online-mode=true。这是服务端 mod,客户端不需要安装。
文件:
config/offlinepass/premium-cache.tsv
config/offlinepass/forced-offline-names.txt
premium-cache.tsv 保存用户名状态结果。forced-offline-names.txt 保存强制使用离线身份的用户名。
需要权限等级 3:
/offlinepass forcedoffline add <name>
/offlinepass forcedoffline remove <name>
/offlinepass forcedoffline list
/offlinepass forcedoffline reload
add 和 remove 会立即更新内存和 forced-offline-names.txt。只有在服务器运行时手动编辑文件后,才需要使用 reload。
./gradlew build
jar 输出位置:
build/libs/offlinepass-0.1.0.jar
MIT License。
实现由 Codex 协助完成。