diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/LoginPackets.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/LoginPackets.java index 635f3338..438db2da 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/LoginPackets.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/LoginPackets.java @@ -28,22 +28,23 @@ class LoginPackets { serverSide.add(Packets.Server.KEY_RESPONSE); clientSide.add(Packets.Client.CLIENT_COMMAND); serverSide.add(Packets.Server.LOGIN); - + // List ping clientSide.add(Packets.Client.GET_INFO); - + // In 1.6.2, Minecraft started sending CUSTOM_PAYLOAD in the server list protocol - if (version.compareTo(MinecraftVersion.HORSE_UPDATE) >= 0) { + // MCPC+/Cauldron contains Forge, which uses CUSTOM_PAYLOAD during login + if (version.isAtLeast(MinecraftVersion.HORSE_UPDATE) || isCauldronOrMCPC()) { clientSide.add(Packets.Client.CUSTOM_PAYLOAD); } - serverSide.add(Packets.Server.KICK_DISCONNECT); - - // MCPC+/Cauldron contains Forge, which uses packet 250 during login + if (isCauldronOrMCPC()) { - clientSide.add(Packets.Client.CUSTOM_PAYLOAD); + serverSide.add(Packets.Server.CUSTOM_PAYLOAD); } + + serverSide.add(Packets.Server.KICK_DISCONNECT); } - + /** * Determine if we are running MCPC or Cauldron. * @return TRUE if we are, FALSE otherwise.