Fix parsing of placeholder status

Fixes #341
This commit is contained in:
games647
2020-05-14 13:41:32 +02:00
parent 477d3df1dd
commit c58eda983a
5 changed files with 34 additions and 21 deletions
@@ -2,9 +2,19 @@ package com.github.games647.fastlogin.core;
public enum PremiumStatus {
PREMIUM,
PREMIUM("Premium"),
CRACKED,
CRACKED("Cracked"),
UNKNOWN
UNKNOWN("Unknown");
private final String readableName;
PremiumStatus(String readableName) {
this.readableName = readableName;
}
public String getReadableName() {
return readableName;
}
}
@@ -18,7 +18,7 @@ public class RateLimiter {
/**
* Ask if access is allowed. If so register the request.
*
* @return true if allowed
* @return true if allowed - false otherwise without any side effects
*/
public boolean tryAcquire() {
// current time millis is not monotonic - it can jump back depending on user choice or NTP