Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/SpigotMC/BungeeCord
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 13, 2024
2 parents a4f2c45 + 6ea4996 commit 95975e9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 25 deletions.
50 changes: 27 additions & 23 deletions protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_19_3, 0x1F ),
map( ProtocolConstants.MINECRAFT_1_19_4, 0x23 ),
map( ProtocolConstants.MINECRAFT_1_20_2, 0x24 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x26 )
map( ProtocolConstants.MINECRAFT_1_20_5, 0x26 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x27 )
);
TO_CLIENT.registerPacket(
Login.class,
Expand All @@ -115,7 +116,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_19_3, 0x24 ),
map( ProtocolConstants.MINECRAFT_1_19_4, 0x28 ),
map( ProtocolConstants.MINECRAFT_1_20_2, 0x29 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x2B )
map( ProtocolConstants.MINECRAFT_1_20_5, 0x2B ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x2C )
);
TO_CLIENT.registerPacket( Chat.class,
Chat::new,
Expand Down Expand Up @@ -147,7 +149,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x43 ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x45 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x47 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x48 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x4C )
);
TO_CLIENT.registerPacket(
BossBar.class,
Expand Down Expand Up @@ -208,7 +210,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x5A ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x5C ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x5E ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x60 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x64 )
);
TO_CLIENT.registerPacket(
ScoreboardScore.class,
Expand All @@ -227,14 +229,14 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x5D ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x5F ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x61 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x64 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x68 )
);
TO_CLIENT.registerPacket(
ScoreboardScoreReset.class,
ScoreboardScoreReset::new,
map( ProtocolConstants.MINECRAFT_1_20_3, 0x42 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x44 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x45 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x49 )
);
TO_CLIENT.registerPacket(
ScoreboardDisplay.class,
Expand All @@ -253,7 +255,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x53 ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x55 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x57 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x58 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x5C )
);
TO_CLIENT.registerPacket(
Team.class,
Expand All @@ -272,7 +274,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x5C ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x5E ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x60 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x63 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x67 )
);
TO_CLIENT.registerPacket(
PluginMessage.class,
Expand Down Expand Up @@ -328,7 +330,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x61 ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x63 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x65 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x68 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x6C )
);
TO_CLIENT.registerPacket(
ClearTitles.class,
Expand All @@ -350,7 +352,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x5F ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x61 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x63 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x66 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x6A )
);
TO_CLIENT.registerPacket(
TitleTimes.class,
Expand All @@ -363,7 +365,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x62 ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x64 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x66 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x69 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x6D )
);
TO_CLIENT.registerPacket(
SystemChat.class,
Expand All @@ -375,7 +377,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x67 ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x69 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x6C ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x6F )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x73 )
);
TO_CLIENT.registerPacket(
PlayerListHeaderFooter.class,
Expand All @@ -398,7 +400,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x68 ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x6A ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x6D ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x70 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x74 )
);
TO_CLIENT.registerPacket(
EntityStatus.class,
Expand Down Expand Up @@ -443,7 +445,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_19_3, 0x1C ),
map( ProtocolConstants.MINECRAFT_1_19_4, 0x1F ),
map( ProtocolConstants.MINECRAFT_1_20_2, 0x20 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x22 )
map( ProtocolConstants.MINECRAFT_1_20_5, 0x22 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x23 )
);
TO_CLIENT.registerPacket(
ViewDistance.class,
Expand All @@ -458,7 +461,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_19_4, 0x4F ),
map( ProtocolConstants.MINECRAFT_1_20_2, 0x51 ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x53 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x55 )
map( ProtocolConstants.MINECRAFT_1_20_5, 0x55 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x59 )
);
TO_CLIENT.registerPacket(
ServerData.class,
Expand All @@ -470,7 +474,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x47 ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x49 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x4B ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x4C )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x50 )
);
TO_CLIENT.registerPacket(
PlayerListItemRemove.class,
Expand All @@ -479,7 +483,7 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_19_4, 0x39 ),
map( ProtocolConstants.MINECRAFT_1_20_2, 0x3B ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x3D ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x3E )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x3F )
);
TO_CLIENT.registerPacket(
PlayerListItemUpdate.class,
Expand All @@ -488,15 +492,15 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_19_4, 0x3A ),
map( ProtocolConstants.MINECRAFT_1_20_2, 0x3C ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x3E ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x3F )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x40 )
);
TO_CLIENT.registerPacket(
StartConfiguration.class,
StartConfiguration::new,
map( ProtocolConstants.MINECRAFT_1_20_2, 0x65 ),
map( ProtocolConstants.MINECRAFT_1_20_3, 0x67 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x69 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x6C )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x70 )
);
TO_CLIENT.registerPacket(
CookieRequest.class,
Expand All @@ -507,25 +511,25 @@ public enum Protocol
StoreCookie.class,
StoreCookie::new,
map( ProtocolConstants.MINECRAFT_1_20_5, 0x6B ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x6E )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x72 )
);
TO_CLIENT.registerPacket(
Transfer.class,
Transfer::new,
map( ProtocolConstants.MINECRAFT_1_20_5, 0x73 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x76 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x7A )
);
TO_CLIENT.registerPacket(
DisconnectReportDetails.class,
DisconnectReportDetails::new,
map( ProtocolConstants.MINECRAFT_1_21, 0x7A ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x7D )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x81 )
);
TO_CLIENT.registerPacket(
ServerLinks.class,
ServerLinks::new,
map( ProtocolConstants.MINECRAFT_1_21, 0x7B ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x7E )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x82 )
);

TO_SERVER.registerPacket(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class ProtocolConstants
public static final int MINECRAFT_1_20_3 = 765;
public static final int MINECRAFT_1_20_5 = 766;
public static final int MINECRAFT_1_21 = 767;
public static final int MINECRAFT_1_21_2 = 1073742035;
public static final int MINECRAFT_1_21_2 = 1073742039;
public static final List<String> SUPPORTED_VERSIONS;
public static final List<Integer> SUPPORTED_VERSION_IDS;

Expand Down
2 changes: 1 addition & 1 deletion proxy/src/main/java/net/md_5/bungee/ServerConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void disconnected(ChannelWrapper channel) throws Exception
{
user.getPendingConnects().remove( target );

if ( !obsolete && user.getPendingConnects().isEmpty() && thisState == State.LOGIN_SUCCESS )
if ( user.getServer() == null && !obsolete && user.getPendingConnects().isEmpty() && thisState == State.LOGIN_SUCCESS )
{
// this is called if we get disconnected but not have received any response after we send the handshake
// in this case probably an exception was thrown because the handshake could not be read correctly
Expand Down

0 comments on commit 95975e9

Please sign in to comment.