aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2022-03-25 18:14:50 +0300
committerPetr Ilin <hevav@hevav.dev>2022-03-25 18:32:05 +0300
commit2435294b7232923443ecda62d2c29aa119a289eb (patch)
treeb0fc7ba75a3d693862d11d0c10b1c65f86ab6acc /src
parenta992cfc04be8f330f669923360199b7b57a49e35 (diff)
downloadLimboAuth-2435294b7232923443ecda62d2c29aa119a289eb.tar.gz
LimboAuth-2435294b7232923443ecda62d2c29aa119a289eb.tar.bz2
LimboAuth-2435294b7232923443ecda62d2c29aa119a289eb.zip
Config parameter to totally disable hybrid auth
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/elytrium/limboauth/LimboAuth.java4
-rw-r--r--src/main/java/net/elytrium/limboauth/Settings.java3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java
index 8a471ca..2530ef9 100644
--- a/src/main/java/net/elytrium/limboauth/LimboAuth.java
+++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java
@@ -451,6 +451,10 @@ public class LimboAuth {
}
public boolean isPremium(String nickname) {
+ if (Settings.IMP.MAIN.FORCE_OFFLINE_MODE) {
+ return false;
+ }
+
try {
if (this.isPremiumExternal(nickname)) {
QueryBuilder<RegisteredPlayer, String> premiumRegisteredQuery = this.playerDao.queryBuilder();
diff --git a/src/main/java/net/elytrium/limboauth/Settings.java b/src/main/java/net/elytrium/limboauth/Settings.java
index 825ce61..997cff4 100644
--- a/src/main/java/net/elytrium/limboauth/Settings.java
+++ b/src/main/java/net/elytrium/limboauth/Settings.java
@@ -52,6 +52,9 @@ public class Settings extends Config {
public boolean ONLINE_MODE_NEED_AUTH = true;
@Comment("Needs floodgate plugin.")
public boolean FLOODGATE_NEED_AUTH = true;
+ @Comment("TOTALLY disables hybrid auth feature")
+ public boolean FORCE_OFFLINE_MODE = false;
+ @Comment("Forces all players to get offline uuid")
public boolean FORCE_OFFLINE_UUID = false;
@Comment("Delay in milliseconds before sending auth-confirming titles and messages to the player. (login-premium-title, login-floodgate, etc.)")
public int PREMIUM_AND_FLOODGATE_MESSAGES_DELAY = 1250;