File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
plugin/src/main/java/net/elytrium/limboapi Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ public class LoginTasksQueue {
89
89
private static final BiConsumer <Object , MinecraftConnection > MC_CONNECTION_SETTER ;
90
90
private static final MethodHandle CONNECT_TO_INITIAL_SERVER_METHOD ;
91
91
private static final MethodHandle SET_CLIENT_BRAND ;
92
- private static final BiConsumer <ClientConfigSessionHandler , String > BRAND_CHANNEL_SETTER ;
92
+ public static final BiConsumer <ClientConfigSessionHandler , String > BRAND_CHANNEL_SETTER ;
93
93
94
94
private final LimboAPI plugin ;
95
95
private final Object handler ;
Original file line number Diff line number Diff line change 43
43
import net .elytrium .limboapi .api .protocol .packets .data .AbilityFlags ;
44
44
import net .elytrium .limboapi .api .protocol .packets .data .MapData ;
45
45
import net .elytrium .limboapi .api .protocol .packets .data .MapPalette ;
46
+ import net .elytrium .limboapi .injection .login .LoginTasksQueue ;
46
47
import net .elytrium .limboapi .protocol .packets .s2c .ChangeGameStatePacket ;
47
48
import net .elytrium .limboapi .protocol .packets .s2c .MapDataPacket ;
48
49
import net .elytrium .limboapi .protocol .packets .s2c .PlayerAbilitiesPacket ;
@@ -299,8 +300,9 @@ private void sendToRegisteredServer(RegisteredServer server) {
299
300
if (this .connection .getProtocolVersion ().compareTo (ProtocolVersion .MINECRAFT_1_20_2 ) >= 0 ) {
300
301
this .sessionHandler .disconnectToConfig (() -> {
301
302
// Rollback original CONFIG handler
302
- this .connection .setActiveSessionHandler (StateRegistry .CONFIG ,
303
- new ClientConfigSessionHandler (this .plugin .getServer (), this .player ));
303
+ ClientConfigSessionHandler handler = new ClientConfigSessionHandler (this .plugin .getServer (), this .player );
304
+ LoginTasksQueue .BRAND_CHANNEL_SETTER .accept (handler , "minecraft:brand" );
305
+ this .connection .setActiveSessionHandler (StateRegistry .CONFIG , handler );
304
306
this .player .createConnectionRequest (server ).fireAndForget ();
305
307
});
306
308
} else {
You can’t perform that action at this time.
0 commit comments