mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-18 14:47:47 +01:00
Renaming function hasValidSessionData -> fetchSessionStatus
This commit is contained in:
parent
be2c6ae116
commit
57809194f3
@ -46,7 +46,7 @@ public class SessionService implements Reloadable {
|
|||||||
database.revokeSession(name);
|
database.revokeSession(name);
|
||||||
PlayerAuth auth = database.getAuth(name);
|
PlayerAuth auth = database.getAuth(name);
|
||||||
|
|
||||||
SessionState state = hasValidSessionData(auth, player);
|
SessionState state = fetchSessionStatus(auth, player);
|
||||||
if(state.equals(SessionState.VALID)) {
|
if(state.equals(SessionState.VALID)) {
|
||||||
RestoreSessionEvent event = bukkitService.createAndCallEvent(
|
RestoreSessionEvent event = bukkitService.createAndCallEvent(
|
||||||
isAsync -> new RestoreSessionEvent(player, isAsync));
|
isAsync -> new RestoreSessionEvent(player, isAsync));
|
||||||
@ -66,8 +66,9 @@ public class SessionService implements Reloadable {
|
|||||||
* @param player the associated player
|
* @param player the associated player
|
||||||
* @return SessionState based on the state of the session (VALID, NOT_VALID, OUTDATED, IP_CHANGED)
|
* @return SessionState based on the state of the session (VALID, NOT_VALID, OUTDATED, IP_CHANGED)
|
||||||
*/
|
*/
|
||||||
private SessionState hasValidSessionData(PlayerAuth auth, Player player) {
|
private SessionState fetchSessionStatus(PlayerAuth auth, Player player) {
|
||||||
if (auth == null) {
|
if (auth == null) {
|
||||||
|
|
||||||
ConsoleLogger.warning("No PlayerAuth in database for '" + player.getName() + "' during session check");
|
ConsoleLogger.warning("No PlayerAuth in database for '" + player.getName() + "' during session check");
|
||||||
return SessionState.NOT_VALID;
|
return SessionState.NOT_VALID;
|
||||||
} else if (auth.getLastLogin() == null) {
|
} else if (auth.getLastLogin() == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user