Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
Fix: protocol being null during online mode login (#4369)
* fix: protocol being null during online mode login * gimme more space * add debug logging for too early downstream packet sending
Dieser Commit ist enthalten in:
Ursprung
592a58a0c8
Commit
46bde0c019
@ -1633,6 +1633,15 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
||||
* @param intendedState the state the client should be in
|
||||
*/
|
||||
public void sendDownstreamPacket(Packet packet, ProtocolState intendedState) {
|
||||
// protocol can be null when we're not yet logged in (online auth)
|
||||
if (protocol == null) {
|
||||
if (geyser.getConfig().isDebugMode()) {
|
||||
geyser.getLogger().debug("Tried to send downstream packet with no downstream session!");
|
||||
Thread.dumpStack();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (protocol.getState() != intendedState) {
|
||||
geyser.getLogger().debug("Tried to send " + packet.getClass().getSimpleName() + " packet while not in " + intendedState.name() + " state");
|
||||
return;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren