aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/elytrium/limboauth
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/elytrium/limboauth')
-rw-r--r--src/main/java/net/elytrium/limboauth/LimboAuth.java1
-rw-r--r--src/main/java/net/elytrium/limboauth/Settings.java4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java
index 8b85a28..f00d3c2 100644
--- a/src/main/java/net/elytrium/limboauth/LimboAuth.java
+++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java
@@ -505,6 +505,7 @@ public class LimboAuth {
}
public boolean needAuth(Player player) {
+ if (!Settings.IMP.MAIN.IP_SESSIONS) return true;
String username = player.getUsername();
String lowercaseUsername = username.toLowerCase(Locale.ROOT);
if (!this.cachedAuthChecks.containsKey(lowercaseUsername)) {
diff --git a/src/main/java/net/elytrium/limboauth/Settings.java b/src/main/java/net/elytrium/limboauth/Settings.java
index f6aa89f..7af7854 100644
--- a/src/main/java/net/elytrium/limboauth/Settings.java
+++ b/src/main/java/net/elytrium/limboauth/Settings.java
@@ -93,6 +93,10 @@ public class Settings extends YamlConfig {
"If the player had the cracked account, and switched to the premium account, the cracked UUID will be used."
})
public boolean SAVE_UUID = true;
+
+ @Comment("Allow players to log in from the same IP without needing to confirm their password again.")
+ public boolean IP_SESSIONS = true;
+
@Comment({
"Saves in the database the accounts of premium users whose login is via online-mode-need-auth: false",
"Can be disabled to reduce the size of stored data in the database"