mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-29 18:27:36 +02:00
Fixed NPE in BungeeCord on cracked login for existing players (#22)
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
* Added localization
|
||||
* Fixed NPE on premium name check if it's pure cracked player
|
||||
* Fixed NPE in BungeeCord on cracked login for existing players
|
||||
|
||||
######1.4
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,8 @@ public class AsyncPremiumCheck implements Runnable {
|
||||
}
|
||||
} else if (profile.isPremium()) {
|
||||
requestPremiumLogin(connection, profile, username, true);
|
||||
} else {
|
||||
plugin.getSession().put(connection, new LoginSession(username, false, profile));
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
plugin.getLogger().log(Level.SEVERE, "Failed to check premium state", ex);
|
||||
|
Reference in New Issue
Block a user