Fabric API

Fabric API

112M Downloads

ServerLoginNetworking global receiver can't receive packets before QUERY_START

james58899 opened this issue ยท 0 comments

commented

Because LuckPerms will read the player profile at QUERY_START, FabricProxy-Lite needs to obtain the player profile from the proxy before QUERY_START. However, due to the change in #3495, currently cannot receive packets before QUERY_START is triggered.

Global receiver copies to local at here, so any packet received before this will cause disconnection.

// Register global receivers.
for (Map.Entry<Identifier, ServerLoginNetworking.LoginQueryResponseHandler> entry : ServerNetworkingImpl.LOGIN.getHandlers().entrySet()) {
ServerLoginNetworking.registerReceiver(this.handler, entry.getKey(), entry.getValue());
}
ServerLoginConnectionEvents.QUERY_START.invoker().onLoginStart(this.handler, this.server, this, this.waits::add);

Also ServerLoginConnectionEvents.INIT never triggers, is this expected?