Skip to content

Commit 3801214

Browse files
committed
Send no known packs
1 parent b738682 commit 3801214

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
@@ -301,8 +301,7 @@ public boolean handle(TransferPacket packet) {
301301
public boolean handle(KnownPacksPacket packet) {
302302
// Server expects us to reply to this packet
303303
if (serverConn.getPlayer().getConnection().getState() != StateRegistry.CONFIG) {
304-
// TODO: just replay the first packet the user sent
305-
serverConn.ensureConnected().write(packet);
304+
serverConn.ensureConnected().write(new KnownPacksPacket());
306305
return true;
307306
}
308307
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)