aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/elytrium/limboauth/Settings.java
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2022-04-02 11:28:16 +0300
committerPetr Ilin <hevav@hevav.dev>2022-04-02 11:28:16 +0300
commit1c63ce46241e8df6f35f33533b808184811863ca (patch)
treef60d791e41c97012c1e18c88bed0593d3b7a24ff /src/main/java/net/elytrium/limboauth/Settings.java
parent757ab79b96b0b6d784fa113a496f56e52f59c88a (diff)
downloadLimboAuth-1c63ce46241e8df6f35f33533b808184811863ca.tar.gz
LimboAuth-1c63ce46241e8df6f35f33533b808184811863ca.tar.bz2
LimboAuth-1c63ce46241e8df6f35f33533b808184811863ca.zip
Better premium/cracked detection+caching (closes #15, closes #19)
Diffstat (limited to 'src/main/java/net/elytrium/limboauth/Settings.java')
-rw-r--r--src/main/java/net/elytrium/limboauth/Settings.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/net/elytrium/limboauth/Settings.java b/src/main/java/net/elytrium/limboauth/Settings.java
index 745a6ee..0ce9186 100644
--- a/src/main/java/net/elytrium/limboauth/Settings.java
+++ b/src/main/java/net/elytrium/limboauth/Settings.java
@@ -90,6 +90,7 @@ public class Settings extends Config {
@Comment("Available dimensions: OVERWORLD, NETHER, THE_END")
public String DIMENSION = "THE_END";
public long PURGE_CACHE_MILLIS = 3600000;
+ public long PURGE_PREMIUM_CACHE_MILLIS = 28800000;
@Comment("QR Generator URL, set {data} placeholder")
public String QR_GENERATOR_URL = "https://api.qrserver.com/v1/create-qr-code/?data={data}&size=200x200&ecc=M&margin=30";
public String TOTP_ISSUER = "LimboAuth by Elytrium";
@@ -120,6 +121,13 @@ public class Settings extends Config {
})
public String ISPREMIUM_AUTH_URL = "https://api.mojang.com/users/profiles/minecraft/%s";
+ @Comment({
+ "If Mojang rate-limits your server, we cannot determine if the player is premium or not",
+ "This option allows you to choose whether every player will be defined as premium or as cracked while Mojang is rate-limiting the server",
+ "True - as premium; False - as cracked"
+ })
+ public boolean ON_RATE_LIMIT_PREMIUM = true;
+
public List<String> REGISTER_COMMAND = List.of("/r", "/reg", "/register");
public List<String> LOGIN_COMMAND = List.of("/l", "/log", "/login");
public List<String> TOTP_COMMAND = List.of("/2fa", "/totp");