This commit is contained in:
samo_lego 2020-10-11 17:33:25 +02:00
parent 57f702f824
commit fcab8f8a46
1 changed files with 9 additions and 7 deletions

View File

@ -121,14 +121,16 @@ public class AuthEventHandler {
playerCache.lastAir = player.getAir(); playerCache.lastAir = player.getAir();
playerCache.wasOnFire = player.isOnFire(); playerCache.wasOnFire = player.isOnFire();
playerCache.wasInPortal = player.getBlockState().getBlock().equals(Blocks.NETHER_PORTAL); playerCache.wasInPortal = player.getBlockState().getBlock().equals(Blocks.NETHER_PORTAL);
playerCache.lastDim = String.valueOf(player.getEntityWorld().getRegistryKey().getValue()); if(isAuthenticated(player)) {
playerCache.lastX = player.getX(); playerCache.lastDim = String.valueOf(player.getEntityWorld().getRegistryKey().getValue());
playerCache.lastY = player.getY(); playerCache.lastX = player.getX();
playerCache.lastZ = player.getZ(); playerCache.lastY = player.getY();
playerCache.lastZ = player.getZ();
// Setting the session expire time // Setting the session expire time
if(isAuthenticated(player) && config.main.sessionTimeoutTime != -1) if(config.main.sessionTimeoutTime != -1)
playerCache.validUntil = System.currentTimeMillis() + config.main.sessionTimeoutTime * 1000; playerCache.validUntil = System.currentTimeMillis() + config.main.sessionTimeoutTime * 1000;
}
} }
// Player chatting // Player chatting