Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-19 22:40:18 +01:00
ConnectorServerEventHandler: set default packet handler (#1148)
This allows disconnect packets to be sent and kick unsupported versions of the game.
Dieser Commit ist enthalten in:
Ursprung
bf238f52c7
Commit
4bcf44638e
@ -108,6 +108,8 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
|
|||||||
public void onSessionCreation(BedrockServerSession bedrockServerSession) {
|
public void onSessionCreation(BedrockServerSession bedrockServerSession) {
|
||||||
bedrockServerSession.setLogging(true);
|
bedrockServerSession.setLogging(true);
|
||||||
bedrockServerSession.setPacketHandler(new UpstreamPacketHandler(connector, new GeyserSession(connector, bedrockServerSession)));
|
bedrockServerSession.setPacketHandler(new UpstreamPacketHandler(connector, new GeyserSession(connector, bedrockServerSession)));
|
||||||
|
// Set the packet codec to default just in case we need to send disconnect packets.
|
||||||
|
bedrockServerSession.setPacketCodec(BedrockProtocol.DEFAULT_BEDROCK_CODEC);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren