1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-19 14:59:27 +00:00

Don't add invalid packet handler twice to subclient sessions

This commit is contained in:
onebeastchris
2025-11-20 15:12:46 +01:00
parent 846e0b5ce0
commit c0b4579436

View File

@@ -62,8 +62,10 @@ public class GeyserServerInitializer extends BedrockServerInitializer {
bedrockServerSession.setLogging(true);
GeyserSession session = new GeyserSession(this.geyser, bedrockServerSession, this.eventLoopGroup.next());
Channel channel = bedrockServerSession.getPeer().getChannel();
channel.pipeline().addAfter(BedrockPacketCodec.NAME, InvalidPacketHandler.NAME, new InvalidPacketHandler(session));
if (!bedrockServerSession.isSubClient()) {
Channel channel = bedrockServerSession.getPeer().getChannel();
channel.pipeline().addAfter(BedrockPacketCodec.NAME, InvalidPacketHandler.NAME, new InvalidPacketHandler(session));
}
bedrockServerSession.setPacketHandler(new UpstreamPacketHandler(this.geyser, session));
} catch (Throwable e) {