aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2022-12-30 16:01:12 +0300
committerPetr Ilin <hevav@hevav.dev>2022-12-30 16:01:12 +0300
commit8886cacd0db218e09aebfe5f44bcfb97e20b914a (patch)
treeee3a1cefb0ff40e5cacd4f766f755201ab646a4c /src/main/java/net
parent9cbeb1ea1120e08985c0859301d6ed65468397ca (diff)
downloadLimboAuth-8886cacd0db218e09aebfe5f44bcfb97e20b914a.tar.gz
LimboAuth-8886cacd0db218e09aebfe5f44bcfb97e20b914a.tar.bz2
LimboAuth-8886cacd0db218e09aebfe5f44bcfb97e20b914a.zip
Do not kick floodgate players with forced offline mode
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/elytrium/limboauth/LimboAuth.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java
index c98497f..dd4bdd8 100644
--- a/src/main/java/net/elytrium/limboauth/LimboAuth.java
+++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java
@@ -504,7 +504,8 @@ public class LimboAuth {
}
public void authPlayer(Player player) {
- if (this.isForcedPreviously(player.getUsername()) && this.isPremium(player.getUsername())) {
+ boolean isFloodgate = !Settings.IMP.MAIN.FLOODGATE_NEED_AUTH && this.floodgateApi.isFloodgatePlayer(player.getUniqueId());
+ if (!isFloodgate && this.isForcedPreviously(player.getUsername()) && this.isPremium(player.getUsername())) {
player.disconnect(this.reconnectKick);
return;
}
@@ -514,7 +515,6 @@ public class LimboAuth {
return;
}
- boolean isFloodgate = !Settings.IMP.MAIN.FLOODGATE_NEED_AUTH && this.floodgateApi.isFloodgatePlayer(player.getUniqueId());
String nickname = player.getUsername();
if (!this.nicknameValidationPattern.matcher((isFloodgate) ? nickname.substring(this.floodgateApi.getPrefixLength()) : nickname).matches()) {
player.disconnect(this.nicknameInvalidKick);