Merge pull request #11 from MiGoYAm/main

Send PacketDeclareCommand only when limbo is connected to proxy
This commit is contained in:
Max 2021-12-30 20:08:23 +02:00 committed by GitHub
commit f1f5d68dd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -223,7 +223,7 @@ public class ClientConnection extends ChannelInboundHandlerAdapter {
if (clientVersion.moreOrEqual(Version.V1_13)){
writePacket(PACKET_DECLARE_COMMANDS);
if(PACKET_PLUGIN_MESSAGE != null)
if (PACKET_PLUGIN_MESSAGE != null)
writePacket(PACKET_PLUGIN_MESSAGE);
}
@ -406,7 +406,7 @@ public class ClientConnection extends ChannelInboundHandlerAdapter {
info.setUuid(uuid);
PacketDeclareCommands declareCommands = new PacketDeclareCommands();
declareCommands.setCommands(Collections.singletonList("limbo"));
declareCommands.setCommands(Collections.emptyList());
PACKET_LOGIN_SUCCESS = PreEncodedPacket.of(loginSuccess);
PACKET_JOIN_GAME = PreEncodedPacket.of(joinGame);

View File

@ -80,8 +80,7 @@ public enum State {
clientBound.register(PacketJoinGame::new,
map(0x01, V1_8, V1_8),
map(0x23, V1_9, V1_12_2),
map(0x25, V1_13, V1_13_2),
map(0x25, V1_14, V1_14_4),
map(0x25, V1_13, V1_14_4),
map(0x26, V1_15, V1_15_2),
map(0x25, V1_16, V1_16_1),
map(0x24, V1_16_2, V1_16_4),