mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-12-22 14:34:59 +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
This commit is contained in:
parent
592a58a0c8
commit
46bde0c019
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue