Fixed NPE in BungeeCord on cracked login for existing players (#22)

This commit is contained in:
games647 committed 2016-06-10 08:57:08 +02:00
1 parent be89eec23b
commit 7733135ce4
4 files changed
+9

No files matched your search

@@ -74,6 +74,9 @@ public class ProtocolSupportListener implements Listener {
}
} else if (profile.isPremium()) {
startPremiumSession(username, loginStartEvent, true, profile);
} else {
BukkitLoginSession loginSession = new BukkitLoginSession(username, profile);
plugin.getSessions().put(loginStartEvent.getAddress().toString(), loginSession);
}
}
}
@@ -117,6 +117,9 @@ public class StartPacketListener extends PacketAdapter {
}
} else if (profile.isPremium()) {
enablePremiumLogin(username, profile, sessionKey, player, packetEvent, true);
} else {
BukkitLoginSession loginSession = new BukkitLoginSession(username, profile);
plugin.getSessions().put(sessionKey, loginSession);
}
}
}