Carpet fake player leave fix

This commit is contained in:
samo_lego 2020-08-28 12:30:50 +02:00
parent 584c7cdc64
commit aff0241049
1 changed files with 3 additions and 1 deletions

View File

@ -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;
} }