mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-30 20:37:52 +01:00
Minor security fix for player management and timerelated problems
This commit is contained in:
parent
2c621e14c1
commit
5cf84693b9
@ -80,10 +80,14 @@ public class NoCheatPlayerImpl implements NoCheatPlayer {
|
||||
}
|
||||
|
||||
public void setLastUsedTime(long currentTimeInMilliseconds) {
|
||||
this.lastUsedTime = System.currentTimeMillis();
|
||||
this.lastUsedTime = currentTimeInMilliseconds;
|
||||
}
|
||||
|
||||
public boolean shouldBeRemoved(long currentTimeInMilliseconds) {
|
||||
if(lastUsedTime > currentTimeInMilliseconds) {
|
||||
// Should never happen, but if it does, fix it somewhat
|
||||
lastUsedTime = currentTimeInMilliseconds;
|
||||
}
|
||||
return lastUsedTime + 60000L < currentTimeInMilliseconds;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user