Skip to content

Commit 4ad8a9c

Browse files
committed
Send no known packs
1 parent 6377a44 commit 4ad8a9c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

proxy/src/main/java/com/velocitypowered/proxy/connection/backend/ConfigSessionHandler.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,7 @@ public boolean handle(TransferPacket packet) {
327327
public boolean handle(KnownPacksPacket packet) {
328328
// Server expects us to reply to this packet
329329
if (serverConn.getPlayer().getConnection().getState() != StateRegistry.CONFIG) {
330-
// TODO: just replay the first packet the user sent
331-
serverConn.ensureConnected().write(packet);
330+
serverConn.ensureConnected().write(new KnownPacksPacket());
332331
return true;
333332
}
334333
return false; // forward

proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/config/KnownPacksPacket.java

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ public class KnownPacksPacket implements MinecraftPacket {
3232

3333
private KnownPack[] packs;
3434

35+
public KnownPacksPacket() {
36+
packs = new KnownPack[0];
37+
}
38+
3539
@Override
3640
public void decode(ByteBuf buf, ProtocolUtils.Direction direction,
3741
ProtocolVersion protocolVersion) {

0 commit comments

Comments
 (0)