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