Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[proposal] 启动器指定端类型 #16

Closed
yushijinhun opened this issue Oct 5, 2018 · 1 comment
Closed

[proposal] 启动器指定端类型 #16

yushijinhun opened this issue Oct 5, 2018 · 1 comment

Comments

@yushijinhun
Copy link
Owner

概述

目前,authlib-injector 难以检测其运行环境是 MC 客户端还是 MC 服务端。这个提案要求启动器向启动命令中加入额外的参数,来告知 authlib-injector 其运行环境。

这个参数称为端类型参数。它是一个 JVM 参数,格式为 -Dauthlibinjector.side={端类型},其中端类型为 client 或 server。

对启动器的变化

  1. 启动时须指定端类型为 client。
    -Dauthlibinjector.side=client
  2. 配置预获取由可选变为强制。
    原因:若不使用配置预获取,authlib-injector 会在启动时从 Yggdrasil API 获取配置。如果网络不稳定,则操作可能失败,进而导致 MC 无法启动。将获取配置的工作交由启动器完成,则可以在启动游戏前就发现网络问题,并提示用户。

对服务端配置的变化

  1. 如果要使用配置预获取,则还需指定端类型为 server。
    -Dauthlibinjector.side=server
  2. 如果不使用配置预获取(仅添加 javaagent 参数),则不需要任何改动。

其他

  1. 配置预获取参数 -Dorg.to2mbn.authlibinjector.config.prefetched 已改名为 -Dauthlibinjector.yggdrasil.prefetched。原参数仍然可用,且在将来也不会移除。
    此项修改已在提交 e4d2311 中,并且在 1.1.19-36fc21d 中可用。
  2. 当未指定端类型参数时,authlib-injector 认为使用了配置预获取的是客户端,未使用的是服务端。
    原因:一般而言,只有启动器会使用配置预获取功能。

欢迎诸位就本提案提出意见。

yushijinhun added a commit that referenced this issue Oct 5, 2018
yushijinhun added a commit that referenced this issue Oct 6, 2018
yushijinhun added a commit that referenced this issue Aug 13, 2020
'authlibinjector.side' option becomes unnecessary now.
This commit discards 'authlibinjector.side' option defined in proposal #16.
yushijinhun added a commit that referenced this issue Aug 13, 2020
'authlibinjector.side' option becomes unnecessary now.
This commit discards 'authlibinjector.side' option defined in proposal #16.
@yushijinhun
Copy link
Owner Author

注意: v1.1.30(或 059dc26 )以后,不再需要添加 -Dauthlibinjector.side={server|client} 参数,若添加则会被忽略。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant