Carpet fake player leave fix
This commit is contained in:
parent
584c7cdc64
commit
aff0241049
|
@ -112,6 +112,8 @@ public class AuthEventHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onPlayerLeave(ServerPlayerEntity player) {
|
public static void onPlayerLeave(ServerPlayerEntity player) {
|
||||||
|
if(isPlayerFake(player))
|
||||||
|
return;
|
||||||
String uuid = convertUuid(player);
|
String uuid = convertUuid(player);
|
||||||
PlayerCache playerCache = playerCacheMap.get(uuid);
|
PlayerCache playerCache = playerCacheMap.get(uuid);
|
||||||
|
|
||||||
|
@ -125,7 +127,7 @@ public class AuthEventHandler {
|
||||||
playerCache.lastZ = player.getZ();
|
playerCache.lastZ = player.getZ();
|
||||||
|
|
||||||
// Setting the session expire time
|
// Setting the session expire time
|
||||||
if(!isPlayerFake(player) && isAuthenticated(player) && config.main.sessionTimeoutTime != -1)
|
if(isAuthenticated(player) && config.main.sessionTimeoutTime != -1)
|
||||||
playerCache.validUntil = System.currentTimeMillis() + config.main.sessionTimeoutTime * 1000;
|
playerCache.validUntil = System.currentTimeMillis() + config.main.sessionTimeoutTime * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue